Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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