Usage abcworks for me:
import abc
class A(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def __init__(self):
pass
class B(A):
def __init__(self):
super(B, self).__init__()
I get warnings, but nothing related to abcor parent __init__not called:
C: 1, 0: Missing module docstring (missing-docstring)
C: 3, 0: Invalid class name "A" (invalid-name)
C: 3, 0: Missing class docstring (missing-docstring)
R: 3, 0: Too few public methods (0/2) (too-few-public-methods)
C: 9, 0: Invalid class name "B" (invalid-name)
C: 9, 0: Missing class docstring (missing-docstring)
R: 9, 0: Too few public methods (0/2) (too-few-public-methods)
R: 3, 0: Abstract class is only referenced 1 times (abstract-class-little-used)
What it's worth, I'm with @holdenweb on this. Sometimes you know better than pylint.
source
share