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
Previously used search terms: format for loop if comment
Code:
x = [1, 2, 3] y = [ a for a in x if ( # asdasd "askldaklsdnmklasmdlkasmdlkasmdlkasmdasd" != "as,mdnaskldmlkasdmlaksdmlkasdlkasdm" and "zxcm,.nzxclm,zxnckmnzxckmnzxczxc" != "zxcasdasdlmnasdlknaslkdnmlaskdm" ) ]
Comparison of Black (previous) vs Ruff (new) outputs:
y = [ a for a in x - if ( + if + ( # asdasd "askldaklsdnmklasmdlkasmdlkasmdlkasmdasd" != "as,mdnaskldmlkasdmlaksdmlkasdlkasdm"
If I move the comment out of the inner parentheses of the loop condition, the outputs match:
for a in x # asdasd if (
Command: ruff format
ruff format
Ruff settings: None for formatting, but target-python is given at the project level, if that matters.
target-python
[project] target-python = "==3.10"
Python version: 3.10 Ruff version: 0.5.0 Black version: 24.3.0
The text was updated successfully, but these errors were encountered:
space
Successfully merging a pull request may close this issue.
Previously used search terms: format for loop if comment
Code:
Comparison of Black (previous) vs Ruff (new) outputs:
Ruff's output
Black's output
If I move the comment out of the inner parentheses of the loop condition, the outputs match:
Command:
ruff format
Ruff settings: None for formatting, but
target-python
is given at the project level, if that matters.Python version: 3.10
Ruff version: 0.5.0
Black version: 24.3.0
The text was updated successfully, but these errors were encountered: