In Python 3, I have the following code:
class A: def __init__(self): pass class B(A): def __init__(self): super().__init__()
This gives a warning to Pylint:
- An old-style class is defined. (Old style class)
- Using super in old style class (super old)
In my understanding, in Python 3, the old-style class no longer exists, and this code is fine.
Even if I explicitly use new-style classes with this code
class A(object): def __init__(self): pass class B(A): def __init__(self): super().__init__()
I get a Pylint warning due to different syntax for calling the parent constructor in Python 3:
- Missing super () argument (missing-super-argument)
So, how can I tell Pylint that I want to check Python 3 code to avoid these messages (without disabling Pylint check)?
source share