[Python-projects] Abstract intermediate class not recognized as such
skip at pobox.com
skip at pobox.com
Fri Sep 12 06:23:19 CEST 2008
Given this class hierarchy:
class A(object):
def methA(self):
raise NotImplementedError("implement methA in subclass")
class B(A):
def methB(self):
raise NotImplementedError("implement methB in subclass")
class C(B):
def methA(self):
print "methA"
def methB(self):
print "methB"
pylint (v 0.14.0, astng 0.17.2, common 0.28.2) complains that B doesn't
provide a definition of methA even though it is itself both a base class for
other classes and defines an unimplemented methB class (both making it a
candidate abstract class). Seems that pylint should recognize on one count
or both that B doesn't need to provide a definition for methA.
Also, note that the PyPI entry for pylint is still 0.14.0 even though your
latest public release is 0.15.0.
--
Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/
More information about the Python-Projects
mailing list