Skip to content

Fix multiple inheritance check for generic classes#6720

Merged
ilevkivskyi merged 6 commits intopython:masterfrom
ilevkivskyi:fix-multi-generic
Apr 25, 2019
Merged

Fix multiple inheritance check for generic classes#6720
ilevkivskyi merged 6 commits intopython:masterfrom
ilevkivskyi:fix-multi-generic

Conversation

@ilevkivskyi
Copy link
Member

Fixes #5973

The fix is straightforward, I just copy a bit of logic (bind self and map type) from normal override check
to the multiple inheritance one (I also factored it out in a small method to avoid duplication).

Using this opportunity I also added/expanded some docstrings.

first = base1[name]
second = base2[name]
first = base1.names[name]
second = base2.names[name]
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is not needed, but it makes the intent of this method more evident.

Copy link
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for adding documentation too!

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.

Definition of "__iter__" in "ItemsView" is incompatible with definition "Sequence"

2 participants