Skip to content

E101 False positive in multiline string #7906

Open
@david-waterworth

Description

@david-waterworth

I have a python model that contains rest endpoint queries defined as multi-line strings, i.e.

query = """
    query ...
"""

ruff is reporting E101 Indentation contains mixed spaces and tabs for the text inside the string.

Technically this is correct as the indentation of the query does contain a mix of tab and spaces - but in general, I feel that ruff shouldn't try and lint a text block.

Note I observed this in a notebook - I've not tested in a py file

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionAwaiting a decision from a maintainerneeds-infoMore information is needed from the issue author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions