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
formatting below code with ruff format file.py command leads to invalid python code:
ruff format file.py
match {}: case { "long_long_long_key": str(long_long_long_key) } if value := "long long long long long long long long long long long value": pass
after formatting with ruff the file will look like this which is not a valid python code:
match {}: case {"long_long_long_key": str(long_long_long_key)} if value := "long long long long long long long long long long long value": pass
ruff version: 0.1.11
The text was updated successfully, but these errors were encountered:
Can reproduce this with ruff 0.1.11 (fefc7e819 2024-01-02) with and without the --preview flag, thanks for the report!
ruff 0.1.11 (fefc7e819 2024-01-02)
--preview
Sorry, something went wrong.
I can take a look -- thanks for this.
Parenthesize breaking named expressions in match guards (#9396)
ba71772
## Summary This is an attempt to solve #9394 by avoiding breaks in named expressions when invalid.
Fixed by #9396. Thanks!
charliermarsh
No branches or pull requests
formatting below code with
ruff format file.py
command leads to invalid python code:after formatting with ruff the file will look like this which is not a valid python code:
ruff version: 0.1.11
The text was updated successfully, but these errors were encountered: