logilab-astng #98613 False positive E1101 'Instance has no member' when it does [open]

The following code gives a warning that emit() isn't a method when it exists on QtCore.QObject.

from PyQt4 import QtCore

class Parent(QtCore.QObject):
   class InnerClassParent(QtCore.QObject):
       def parent_do(self):
           self.emit(QtCore.SIGNAL('FOO'))

class Child(Parent):
   class InnerClassChild(Parent.InnerClassParent):
       def child_do(self):
           self.emit(QtCore.SIGNAL('FOO'))

m = Child.InnerClassChild()
m.child_do()
E1101: 11,12:Child.InnerClassChild.child_do: Instance of 'InnerClassChild' has  no 'emit' member

However, running the code generates no errors.

This seems to be specific to QtCore.QObject, as adding a fake pure Python QObject with an emit() method, pylint generates no warnings.

prioritynormal
typebug
done in0.24.1
closed by<not specified>