<div dir="ltr">Black doesn't format docstrings[0] so it won't really help us. Flake8 is a wrapper for a collection of tools and the one that lints docstrings (pydocstyle[1]) can be run independently without flake8. So I think this questions around how/if to lint docstrings and whether or not we want to use black are independent.<div><br></div><div>[0] <a href="https://github.com/python/black/issues/144">https://github.com/python/black/issues/144</a></div><div>[1] <a href="https://github.com/PyCQA/pydocstyle">https://github.com/PyCQA/pydocstyle</a><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 4, 2019 at 10:05 AM Brian Bouterse <<a href="mailto:bbouters@redhat.com">bbouters@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">@mdellweg if we adopt Black broadly, how does that affect your proposal here?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 21, 2019 at 11:50 AM Austin Macdonald <<a href="mailto:austin@redhat.com" target="_blank">austin@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Something else to consider: some docstrings are rendered as user-facing documentation in the autogenerated REST docs. This means that docstring linting needs to be ignored for ViewSets. For example, I have a PR open that alters pulp_file viewset docstrings to contain html, to pass the linter, we have add docstring exceptions to the flake8 config. <br></div><div><br></div><div>My initial reaction is that we might be better off keeping the flake8-docstring package out of pulplift, and we should also remove it from travis.<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 21, 2019 at 11:08 AM Matthias Dellweg <<a href="mailto:dellweg@atix.de" target="_blank">dellweg@atix.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">tl;dr: Docstring linting is inconsistent across pulp repositories.<br>
To make it consistent, do we want to enforce it everywhere, and repair<br>
more than 700 findings?<br>
<br>
What started out as a oneliner [0] surfaced as a bigger problem:<br>
<br>
Whether flake8 performs linting on docstrings is solely dependent<br>
(afaik) on the existence of a specific python package<br>
(flake8-docstring) in the system.<br>
At the same time, there are repositories (pulpcore,<br>
pulpcore-plugin, ???) that do not install this package in their ci<br>
pipeline, as well as repos that do (pulp_deb, pulp_ansible, ???).<br>
So it is hard to select whether it should be installed in a pulplift<br>
source box.<br>
Not installing it means, there are linting errors showing up in<br>
travis only, however installing it will prevent linting pulpcore<br>
locally.<br>
That said, i think we should follow the same linting rules in all<br>
repositories, and more specific i tend to include docstring linting.<br>
However there are over 700 findings in pulpcore alone.<br>
<br>
[0] <a href="https://github.com/pulp/pulpcore/pull/138" rel="noreferrer" target="_blank">https://github.com/pulp/pulpcore/pull/138</a><br>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>