I have the following error with pylint:
Pylint error W0232: class has no __init__ method
I understand what it means. I have to create the __init__
method.
The problem is that this class is inherited from parent class. I know that I'm able to create the __init__
method and just use super(myclass, self).__init__()
but is it really necessary? I have nothing to add to __init__
. I want to know if it is a better practice to create __init__
method in any class.
As @Sean pointed out, pylint
should not complain if __init__()
is defined in a parent class. Сhances are pylint
cannot find that class. Make sure the module defining it is actually loaded when you invoke pylint
(e.g. run it on the containing package).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With