-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome
Description
Description
The fix for unnecessary-list-comprehension-set (C403) produces a syntax error when a comma follows the argument.
$ cat >c403.py <<'# EOF'
set([x for x in range(5)],)
# EOF
$ ruff --isolated check --select C403 c403.py --unsafe-fixes --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.This is similar to #15852. I checked the rest of that series of rules and C403 seems to be the only one this bug still applies to.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome