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

Use upper bound as inference fallback more consistently #16344

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi commented Oct 27, 2023

Fixes #16331

Fix is straightforward: do not use the fallback, where we would not give the error in the first place.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@ilevkivskyi ilevkivskyi merged commit b41c8c1 into python:master Oct 27, 2023
18 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-infer-fallback branch October 27, 2023 17:35
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.

Regression: inferred type too wide when using type variable bound
2 participants