logilab-astng #4601 Exception: NotFoundError: ItemDataRole [open]
Can lead to pylint crash. See the debian bug report for details.
To reproduce, run pylint on:
from PyQt4 import QtCore class Cl(object): def method(self, r = QtCore.Qt.DisplayRole): pass
Maarten ter Huurne:
I think I have identified the cause of this bug: This problem seems to occur on all enum types from PyQt4: "ItemDataRole" is one, but it also occurs on "ConnectionType". The enums are wrapped inside a class named "Qt". So the full name of "ItemDataRole" is "PyQt4.QtCore.Qt.ItemDataRole". The function "astng_from_class" is called with "ItemDataRole" as the class and "PyQt4.QtCore" as the module, both of which are correct. But because of the "Qt" wrapper class, "ItemDataRole" does not exist directly under "PyQt4.QtCore", where it is expected by this function.
|done in||<not specified>|
|closed by||<not specified>|
- pylint #18862 E0601 false positive with lambda functions
- logilab-astng #18773 inference bug on class members
- pylint #4288 message [en|dis]abling refactoring
- pylint #3203 disabling W0702 (no exception's type specified) works in a strange way
- logilab-astng #9515 strange message for non-class "Class baz has no egg member"