Open
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
4
Version
ruff 0.12.1 (32c5418 2025-06-26)