Skip to content

Use upper bound as inference fallback more consistently#16344

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-infer-fallback
Oct 27, 2023
Merged

Use upper bound as inference fallback more consistently#16344
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-infer-fallback

Conversation

@ilevkivskyi
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
@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