-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rule D208 cause panic #9080
Comments
konstin
added a commit
that referenced
this issue
Dec 15, 2023
Fix #9080 Example, where `[]` is a 2 byte non-breaking space: ``` def f(): """ ^^^^ Real indentation is 4 chars overindented ^^^^^^ overindentation is 6 - 4 = 2 chars due to this line [] [] further indented ^^^^^ we take these 4 chars/5 bytes to match the docstring ... ^^^ ... and these 2 chars/3 bytes to remove the `over_indented_size` ... ^^ ... but preserve this real indent ```
konstin
added a commit
that referenced
this issue
Dec 15, 2023
Fix #9080 Example, where `[]` is a 2 byte non-breaking space: ``` def f(): """ ^^^^ Real indentation is 4 chars overindented ^^^^^^ overindentation is 6 - 4 = 2 chars due to this line [] [] further indented ^^^^^ we take these 4 chars/5 bytes to match the docstring ... ^^^ ... and these 2 chars/3 bytes to remove the `over_indented_size` ... ^^ ... but preserve this real indent ```
konstin
added a commit
that referenced
this issue
Dec 15, 2023
Fix #9080 Example, where `[]` is a 2 byte non-breaking space: ``` def f(): """ ^^^^ Real indentation is 4 chars overindented ^^^^^^ overindentation is 6 - 4 = 2 chars due to this line [] [] further indented ^^^^^ we take these 4 chars/5 bytes to match the docstring ... ^^^ ... and these 2 chars/3 bytes to remove the `over_indented_size` ... ^^ ... but preserve this real indent ```
konstin
added a commit
that referenced
this issue
Dec 15, 2023
Fix #9080 Example, where `[]` is a 2 byte non-breaking space: ``` def f(): """ ^^^^ Real indentation is 4 chars overindented ^^^^^^ overindentation is 6 - 4 = 2 chars due to this line [] [] further indented ^^^^^ we take these 4 chars/5 bytes to match the docstring ... ^^^ ... and these 2 chars/3 bytes to remove the `over_indented_size` ... ^^ ... but preserve this real indent ```
charliermarsh
pushed a commit
that referenced
this issue
Dec 15, 2023
Fix #9080 Example, where `[]` is a 2 byte non-breaking space: ``` def f(): """ Docstring header ^^^^ Real indentation is 4 chars docstring body, over-indented ^^^^^^ Over-indentation is 6 - 4 = 2 chars due to this line [] [] docstring body 2, further indented ^^^^^ We take these 4 chars/5 bytes to match the docstring ... ^^^ ... and these 2 chars/3 bytes to remove the `over_indented_size` ... ^^ ... but preserve this real indent ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ruff 0.1.7 (latest changes from main branch)
file content:
error
python_compressed.zip
The text was updated successfully, but these errors were encountered: