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.
|appeared in||<not specified>|
|done in||<not specified>|
|debian bug number||435869|
|closed by||<not specified>|