Skip to content
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 incorrect MRO being calculated for scoped multiple inheritance #844

Merged
merged 3 commits into from
Dec 12, 2020
Merged

Fix incorrect MRO being calculated for scoped multiple inheritance #844

merged 3 commits into from
Dec 12, 2020

Conversation

timmartin
Copy link
Contributor

Clone the context used in ClassDef._inferred_bases before using it to infer the type of base classes.

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

If a class inherits from two bases and the classes are expressed as a
non-trivial expression such as qualified with a module name, classes
after the first could not be inferred due to reusing the context
object in _inferred_bases

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #843

If a class inherits from two bases and the classes are expressed as a
non-trivial expression such as qualified with a module name, classes
after the first could not be inferred due to reusing the context
object in _inferred_bases
@timmartin
Copy link
Contributor Author

I can't figure out why this is failing the pylint step in the build. There seem to be regressions marked in files I haven't touched.

@hippo91 hippo91 self-assigned this Nov 24, 2020
Copy link
Contributor

@hippo91 hippo91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timmartin thanks for this very clear PR! It is all good for me. I ran pylint tests against your PR branch and every thing is ok so let's merge it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect MRO inferred with multiple inheritance from module-qualified classes
2 participants