Reputation: 6105
I have classes organized like so:
class One:
def funcOne(self):
doSomething()
class Two(One):
def funcTwo(self):
self.funcOne()
When I ran this, it worked, and Python's inheritance model allowed for Two
to be able to call funcOne
.
However, running Pylint gives me the error:
[E1101 (no-member), myscript] Instance of 'Two' has no 'funcOne' member
I already looked at another question on the site, but that question concerned variables, and the only solution proposed was to put them in a dictionary, which you can't do with methods.
How can I get Pylint to recognize the inheritance behavior?
I'm running Pylint 1.1.0, which is ridiculously old. Maybe that's the cause?
Upvotes: 4
Views: 10342
Reputation: 6105
It turns out that my version of Pylint was severely out of date. I was running version 1.1.0, and updated to the newest version 1.6.4, and the warnings were gone!
I assume this is a bug in Pylint that was fixed between the versions.
Upvotes: 2
Reputation: 12265
Call self.funcOne()
Also, class One should inherit from object:
class One(object):
...
Upvotes: 0