-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Fix crash on Super.getattr
for previously uninferable attributes
#1370
Fix crash on Super.getattr
for previously uninferable attributes
#1370
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good already !
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
This also fixes pylint no-member false positives: no-member doesn't warn if the owner is Uninferable, but because of this bug the Uninferable value was missing from |
Steps
Description
Will close when merged: #pylint-dev/pylint#5679
Pretty difficult to replicate this, but whenever the result of the inference was
Uninferable
we did not add that to the cache. Instead we added[]
to the cache as this is howresults
is initialised. On a next try of inference of that node we see that the node is in the cache and yield from the empty list instead of yieldingUninferable
. This seems only relevant whenever we get more than 100+ inference tries for a single node, which I think was happening with thesqlalchemy
node.Type of Changes
Related Issue