Skip to content

E101 should ignore multiline strings #8443

@konstin

Description

@konstin

In the code below, the whitespace ahead of a and b contains tabs and spaces:

from pathlib import Path


def b():
    Path("my_data.txt").write_text("""
    	a
    		b
    """)

This raises "E101 Indentation contains mixed spaces and tabs", even though this is not indentation but the contents of a multiline string where the leading indentation is user data and not python code. We should ignore multiline strings for E101.

Metadata

Metadata

Assignees

No one assigned

    Labels

    linterRelated to the linter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions