-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyreverse
should check that klass
is still ClassDef
#9797
Comments
This bug makes sense. Where did you run into this? Can we just escape early in that path when we encounter an |
I ran into it trying to run The full traceback is as follows:
On the face of it, that sounds like a decent idea to me, but I wouldn't have any idea where to start making those changes. I was hoping to treat
Another alternative to avoid added complexity in |
The fix should be made here: pylint/pylint/pyreverse/diadefslib.py Line 200 in d5bc170
I'm moving this issue to the |
pyreverse
should check that klass
is still ClassDef
Ran into this when trying to use pyreverse, but I think this might be an astroid bug. It seems like the issue is that
is_stdlib_module()
expects a string module name, but in cases where the node isUninferable
then the specialUninferableBase
object returnsself
for almost all attribute access, including.name
. This leads to confusing exceptions that are hard for a user to interpret.Steps to reproduce
Current behavior
Expected behavior
return
False
(UninferableBase
is not known to be in stdlib)Astroid version
The text was updated successfully, but these errors were encountered: