-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations
Description
Summary
The fix for unnecessary-empty-iterable-within-deque-call (RUF037) can introduce a syntax error when deque is parenthesized and preceded by a keyword without intervening white space.
$ cat >ruf037.py <<'# EOF'
from collections import deque
0 or(deque)([])
# EOF
$ ruff --isolated check ruf037.py --select RUF037 --preview --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.Version
ruff 0.11.13 (5faf72a 2025-06-05)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violations