We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def test_something(): assert foo() == """\ assert [1, 2, 3] == [1, 4, 3] At index 1 diff: 2 != 4 Use -v to get more diff"""
Here, the white space on line 2 of the expected value is intentional, yet ruff check --fix deletes it without question.
ruff check --fix
Or is this actually a bug, and it shouldn't be applying to strings at all?
Disable this rule and use ruff format instead, as it doesn't modify the content of strings.
ruff format
The text was updated successfully, but these errors were encountered:
I think that rule shouldn't apply to strings, or if it does, it should be marked as unsafe.
We generally recommend the use of the formatter over style related lint rules if you use the formatter anyway (avoids running unnecessary rules )
Sorry, something went wrong.
It might be an actual bug because we do mark it as unsafe inside a multiline string:
ruff/crates/ruff_linter/src/rules/pycodestyle/rules/trailing_whitespace.rs
Lines 105 to 113 in 3209b85
Successfully merging a pull request may close this issue.
Here, the white space on line 2 of the expected value is intentional, yet
ruff check --fix
deletes it without question.Or is this actually a bug, and it shouldn't be applying to strings at all?
Workaround
Disable this rule and use
ruff format
instead, as it doesn't modify the content of strings.The text was updated successfully, but these errors were encountered: