pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

W291: Triple-Quoted string being checked for trailing whitespace and similar

Open jwg4 opened this issue 9 years ago • 2 comments

This seems like a regression from the previous issue https://github.com/PyCQA/pycodestyle/issues/411:

A triple-quoted string which contain a trailing whitespace is reported as W291:

foo = """Hello
world.   
How are you?
"""

[ file test.py - The second line contains the trailing spaces. ]

$ pycodestyle test.py 
test.py:2:7: W291 trailing whitespace

$ pip freeze
argparse==1.2.1
pycodestyle==2.0.0
wsgiref==0.1.2

The more detailed example given in https://github.com/PyCQA/pycodestyle/issues/411 also seems to break, with all four types of errors reported.

jwg4 avatar Jul 08 '16 15:07 jwg4