[Python-ideas] A proliferation of (un-)Pythonically programmatic pragmas

Brett Cannon brett at python.org
Mon Nov 13 17:18:13 EST 2017


On Mon, Nov 13, 2017, 13:59 Paul Moore, <p.f.moore at gmail.com> wrote:

> On 13 November 2017 at 20:43, MRAB <python at mrabarnett.plus.com> wrote:
> > On 2017-11-13 19:10, Barry Warsaw wrote:
> >> The specifics aren't as important as the general use case: multiple
> >> tools competing for the same valuable real-estate.
> >>
> >> I have no ideas how to improve the situation, and of course any solution
> >> would involve some coordination between all of these tools, but it's
> >> beginning to feel like a losing battle.  Is there a better way?
> >>
> > I suppose that you could have suggest to them that they follow a
> convention
> > such as:
> >
> > 1. There can be multiple pragmas in a comment, separated by semicolons:
> if
> > you don't recognise it, skip past the semicolon.
> >
> > 2. A pragma can be prefixed with the name of the tool, e.g. "#
> flake8.noqa:
> > F401": if there's a prefix, but it's not yours, skip past the semicolon.
>
> An informational PEP defining a common convention for pragma-style
> comments could standardise things. I'd suggest starting a discussion
> (somewhere?) with the development teams for the relevant projects
> (flake8, mypy, coverage...) with the intention of developing such a
> PEP that they could all support.
>

And possibly the easiest way to reach them is on the pyqa-dev mailing list.

-brett


> Paul
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171113/94984215/attachment-0001.html>


More information about the Python-ideas mailing list