R1725 super-with-arguments¶
- Message
'Consider using Python 3 style super() without arguments'
- Description
Emitted when calling the super() builtin with the current class and instance. On Python 3 these arguments are the default and they can be omitted.
Example¶
class A:
pass
class B(A):
def __init__(self, some_arg):
super(B, self).__init__()
self.something = some_arg
6:8: R1725: Consider using Python 3 style super() without arguments
Why bother?¶
The Python 3 way without arguments is easier to read and requires less work when changing the class name.
Also see PEP 3135: New super.
Running Pylint locally? In your CI?
There is a better way! Run PyCodeQual & get Pylint findings with history, diffs and statistics.
Click here to find out more.