<p>我组织的课程是这样的:</p>
<pre><code>class One:
def funcOne(self):
doSomething()
class Two(One):
def funcTwo(self):
self.funcOne()
</code></pre>
<p>当我运行这个程序时,它工作了,Python的继承模型允许<code>Two</code>能够调用<code>funcOne</code>。</p>
<p>但是,运行<code>pylint</code>会产生错误:</p>
<pre><code>[E1101 (no-member), myscript] Instance of 'Two' has no 'funcOne' member
</code></pre>
<p>我已经看过了<a href="https://stackoverflow.com/questions/25245414/pylint-warnings-on-inherited-nested-class-members">another question on the site</a>,但是这个问题涉及到变量,唯一的解决方案是把它们放到字典中,这是方法所不能做到的。</p>
<p>如何让<code>pylint</code>识别继承行为?</p>
<hr/>
<p>编辑:我正在运行<code>pylint 1.1.0</code>,这是可笑的老,也许这就是原因?</p>