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. | |
priority | important |
---|---|
type | bug |
done in | <not specified> |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |
similar entities
- 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"
[see all]
Comments
-
2008/10/24 09:55, written by anon
-
2008/11/19 14:02, written by sthenault
add commentAs far as I understand the logic of astng, this to nobody expects NotFoundError exception to popgrade to client code. I think the following patch fixes the problem in a proper way:
I've fixed the crash, though the pb of resolving nested classes is still there...