Skip to content

W191: erroneously checks indentation within triple-quoted strings #376

@petere

Description

@petere

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions