You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a module, at which end I have a definition of a function with a doc string within triple quotes without any implementation. I've run pep8 (v1.5.7) on it and I get the following error:
Traceback (most recent call last):
File "~/.local/bin/pep8", line 11, in
sys.exit(_main())
File "~/.local/lib/python2.7/site-packages/pep8.py", line 1929, in _main
report = pep8style.check_files()
File "~/.local/lib/python2.7/site-packages/pep8.py", line 1672, in check_files
runner(path)
File "~/.local/lib/python2.7/site-packages/pep8.py", line 1684, in input_file
return fchecker.check_all(expected=expected, line_offset=line_offset)
File "~/.local/lib/python2.7/site-packages/pep8.py", line 1456, in check_all
self.check_logical()
File "~/.local/lib/python2.7/site-packages/pep8.py", line 1328, in check_logical
(start_row, start_col) = mapping[0][1]
TypeError: 'NoneType' object has no attribute '__getitem__'
After some tests, I found that it's caused by not correctly matching the docstring quotes. Can be tested simply by running pep8 on
def foo():
"""test docstring""'
Notice the last being ' not ".
If I use single quotes, nothing happens.
The correct behaviour should be something like:
E901 TokenError: EOF in multi-line string
i.e. when a string is not correctly quoted at the end of the file
The text was updated successfully, but these errors were encountered:
I'm writing a module, at which end I have a definition of a function with a doc string within triple quotes without any implementation. I've run pep8 (v1.5.7) on it and I get the following error:
After some tests, I found that it's caused by not correctly matching the docstring quotes. Can be tested simply by running pep8 on
Notice the last being
'
not"
.If I use single quotes, nothing happens.
The correct behaviour should be something like:
i.e. when a string is not correctly quoted at the end of the file
The text was updated successfully, but these errors were encountered: