pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

W191: erroneously checks indentation within triple-quoted strings

Open petere opened this issue 10 years ago • 16 comments

The following code

if True:
    print("""
    tab at start of this line
""")

produces

test.py:3:1: E101 indentation contains mixed spaces and tabs
test.py:3:1: W191 indentation contains tabs

Both of these are wrong, I believe, because the string content is not part of the program indentation.

python -t does not warn about this either.

petere avatar Feb 01 '15 18:02 petere