-
-
Notifications
You must be signed in to change notification settings - Fork 280
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 inference of instance attributes defined in base class #933
Fix inference of instance attributes defined in base class #933
Conversation
d246698
to
90c42f3
Compare
@nelfin Would you mind resolving the merge conflicts? This PR seems like one I can review within the next few days. |
90c42f3
to
42530a8
Compare
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.
The change itself LGTM. Just some minor comments regarding the tests.
Ref pylint-dev#932. The cause of this appears to be failing to specify the lookupname on the inference context in BaseInstance.igetattr. Additionally, the context path key was not set in a manner that matched other usages. This appears to date back to at least 2015 when context path keys were changed. The usage as a tuple instead of a node with implict lookupname was changed last in 3d342e8 but the lookup key was preserved throughout various changes since then.
42530a8
to
97d33ad
Compare
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.
Thanks 🐬
I know there's no perfect way to manage pull requests on GitHub, but I don't like how it disregarded all of the commit message and instead tells people to refer to this PR link. I'd rather that those messages stayed in the history. |
Not completely sure about that. Up until now, when I merged something I decided on the go what made sense to keep. For this one, as it's just a small bugfix, I chose to remove it. I almost never look at a commit message outside of Github history where the PR is also available so I'm not the best one to judge. If you like, I can try to keep yours if I happen to merge any other of your PRs. |
That's fine, it's not likely to cause too much confusion. To me, the real value in a small bugfix is not the lines itself, but the explanation as to why things broke.
This repository is actually older than GitHub itself so it's probably prudent to keep a "backup".
If it's not too much trouble. |
Steps
Description
Ref #932. The cause of this appears to be failing to specify the
lookupname
on the inference context inBaseInstance.igetattr
.Additionally, the context path key was not set in a manner that matched
other usages. This appears to date back to at least 2015 when context
path keys were changed. The usage as a tuple instead of a node with
implict
lookupname
was changed last in 3d342e8 but the lookup key waspreserved throughout various changes since then.
Type of Changes
Related Issue
Closes #932