-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
help wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
The documentation for super-call-with-parameters (UP008) says:
In Python 3,
supercan be invoked without any arguments when: (1) the first argument is__class__, and (2) the second argument is equivalent to the first argument of the enclosing method.
However, the rule only applies when the first argument is the class by name. UP008 should check for __class__ too.
$ cat >up008.py <<'# EOF'
class A:
def foo(self):
pass
class B(A):
def bar(self):
super(__class__, self).foo()
# EOF
$ ruff --isolated check up008.py --select UP008
All checks passed!Version
ruff 0.11.12 (aee3af0 2025-05-29)
Metadata
Metadata
Assignees
Labels
help wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule