Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E101 should ignore multiline strings #8443

Closed
konstin opened this issue Nov 2, 2023 · 1 comment
Closed

E101 should ignore multiline strings #8443

konstin opened this issue Nov 2, 2023 · 1 comment
Labels
linter Related to the linter

Comments

@konstin
Copy link
Member

konstin commented Nov 2, 2023

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.

@MichaReiser MichaReiser added the linter Related to the linter label Nov 2, 2023
@charliermarsh
Copy link
Member

I believe this is a dupe of #7906 where I was asking for a situation in which this would be used in practice.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter Related to the linter
Projects
None yet
Development

No branches or pull requests

3 participants