<div dir="ltr">I'm +1 on merging the proposals; it just seems easier. If not, I'd bring it as a followup proposal because I see value in this docstring linting.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 4, 2019 at 11:00 AM Matthias Dellweg <<a href="mailto:dellweg@atix.de">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">The core problem this proposal tried to counteract is, just like the<br>
one with black, inconsistency across different repositories in the pulp<br>
namespace. Some lint docstrings and others don't even adhere to the<br>
linted style. Given the architecture of flake8 this leads to strange<br>
effects when you try to lint your code in the pulplift boxes.<br>
So what i really am aiming for here is consistency wrt to docstrings<br>
and docstring linting. This sounds like beeing almost the same goal as<br>
the black proposal. It would be fine for me to even merge those<br>
proposals.<br>
<br>
Matthias<br>
<br>
On Tue, 4 Jun 2019 10:29:58 -0400<br>
David Davis <<a href="mailto:daviddavis@redhat.com" target="_blank">daviddavis@redhat.com</a>> wrote:<br>
<br>
> Black doesn't format docstrings[0] so it won't really help us. Flake8<br>
> is a wrapper for a collection of tools and the one that lints<br>
> docstrings (pydocstyle[1]) can be run independently without flake8.<br>
> So I think this questions around how/if to lint docstrings and<br>
> whether or not we want to use black are independent.<br>
> <br>
> [0] <a href="https://github.com/python/black/issues/144" rel="noreferrer" target="_blank">https://github.com/python/black/issues/144</a><br>
> [1] <a href="https://github.com/PyCQA/pydocstyle" rel="noreferrer" target="_blank">https://github.com/PyCQA/pydocstyle</a><br>
> <br>
> David<br>
> <br>
> <br>
> On Tue, Jun 4, 2019 at 10:05 AM Brian Bouterse <<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>><br>
> wrote:<br>
> <br>
> > @mdellweg if we adopt Black broadly, how does that affect your<br>
> > proposal here?<br>
> ><br>
> > On Tue, May 21, 2019 at 11:50 AM Austin Macdonald<br>
> > <<a href="mailto:austin@redhat.com" target="_blank">austin@redhat.com</a>> wrote:<br>
> >  <br>
> >> Something else to consider: some docstrings are rendered as<br>
> >> user-facing documentation in the autogenerated REST docs. This<br>
> >> means that docstring linting needs to be ignored for ViewSets. For<br>
> >> example, I have a PR open that alters pulp_file viewset docstrings<br>
> >> to contain html, to pass the linter, we have add docstring<br>
> >> exceptions to the flake8 config.<br>
> >><br>
> >> My initial reaction is that we might be better off keeping the<br>
> >> flake8-docstring package out of pulplift, and we should also<br>
> >> remove it from travis.<br>
> >><br>
> >><br>
> >> On Tue, May 21, 2019 at 11:08 AM Matthias Dellweg <<a href="mailto:dellweg@atix.de" target="_blank">dellweg@atix.de</a>><br>
> >> wrote:<br>
> >>  <br>
> >>> tl;dr: Docstring linting is inconsistent across pulp repositories.<br>
> >>> To make it consistent, do we want to enforce it everywhere, and<br>
> >>> repair 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<br>
> >>> pulplift 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<br>
> >>> linting. 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>
> >>>  <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>
> >>  <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>