C419 unsafe fixes with trailing comma causes syntax error: "Generator expression must be parenthesized" #14089
Labels
bug
Something isn't working
fixes
Related to suggested fixes for violations
help wanted
Contributions especially welcome
Hello, thanks for such a great package!
When fixing C419 with
--unsafe-fixes
on.py
file with trailing comma, the fixed code sometimes causes syntax error, because the trailing comma is not removed.A minimal code snippet that reproduces the bug.
example.py
:example.py
has the following contents:python example.py
causes syntax error:Additional information
List of keywords you searched for before creating this issue.
The current Ruff settings
pyproject.toml
The current Ruff version
The text was updated successfully, but these errors were encountered: