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 is_overlapping_types() logic for fallback instances #7351

Merged
merged 2 commits into from Aug 16, 2019

Conversation

@ilevkivskyi
Copy link
Collaborator

commented Aug 16, 2019

Fixes #7350

This also fixes an unrelated issue that went unnoticed because of a poor test (in that case the problem was because of a callable fallback, which is a metaclass for class objects).

@Michael0x2a if you don't have time to review this soon, then I will merge without waiting to unblock an internal pin move.

@ilevkivskyi ilevkivskyi requested a review from Michael0x2a Aug 16, 2019
Copy link
Collaborator

left a comment

I think this seems reasonable.

The fact that this disallows overloads with literals and subclasses of ints also seems reasonable -- such APIs seem like an antipattern to me anyways.

Maybe we should add a test case for the overload example? Otherwise LGTM.

Ivan Levkivskyi
@ilevkivskyi ilevkivskyi merged commit 36fcf1d into python:master Aug 16, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ilevkivskyi ilevkivskyi deleted the ilevkivskyi:fix-strict-eq-literal branch Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.