pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E501: URLs not allowed in first line of assigned multiline strings

Open jayvdb opened this issue 7 years ago • 0 comments

New in pycodestyle 2.4, a long-unbroken-string (e.g. URL) in the first line of a multiline string is now an error.

I suspect it is due to https://github.com/PyCQA/pycodestyle/pull/630 , as the most likely candidate due to it touching E501.

v = """http://www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com/
http://www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com/
"""
$ pycodestyle longlines.py
longlines.py:1:80: E501 line too long (86 > 79 characters)

Oddly, it has to be assigned, i.e. not a conventional docstring.

jayvdb avatar Apr 14 '18 11:04 jayvdb