-
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
Summary
The fix for super-call-with-parameters (UP008) should be suppressed when the super call has any keyword arguments, or else it changes the program’s behavior.
$ cat >up008.py <<'# EOF'
class Ord(int):
def __len__(self):
return super(Ord, self, uhoh=True, **{"error": True}).bit_length()
print(len(Ord(8)))
# EOF
$ python up008.py 2>&1 | tail -n 1
TypeError: super() takes no keyword arguments
$ ruff --isolated check up008.py --select UP008 --unsafe-fixes --fix
Found 1 error (1 fixed, 0 remaining).
$ python up008.py
4Version
ruff 0.12.1 (32c5418 2025-06-26)
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