[Python-ideas] A proliferation of (un-)Pythonically programmatic pragmas
Chris Barker
chris.barker at noaa.gov
Tue Nov 14 20:12:10 EST 2017
On Mon, Nov 13, 2017 at 5:37 PM, Barry Warsaw <barry at python.org> wrote:
> One of the things that bother me about end-line comments is that this is
> going to blow up line length limits.
Is that a problem? the linters can ignore lines to long if they are only
too long due to one of these :-)
> I think this could work if such
> pragma comments could apply to the following line, and multiline pragmas
> would be acceptable. Then you could have something like:
>
> # flake8: disable=unused-import
> # mypy: alias=pathlib2.Path
> # coverage: ignore=when>py2.7
>
I'd much rather have the tools all look at the entire comment for their
particular pragma.
and then, even if you wanted to put it on the previous line, you would't
have the line-length issue:
# flake8: disable=unused-import mypy: alias=pathlib2.Path coverage:
ignore=when>py2.7
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171114/ecaa0552/attachment-0001.html>
More information about the Python-ideas
mailing list