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 bounds as fallback solutions for inference #16184

Merged
merged 1 commit into from Sep 27, 2023

Conversation

ilevkivskyi
Copy link
Member

Fixes #13220

This looks a bit ad-hoc, but it is probably the least disruptive solution possible.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/__init__.py:1319: error: Unused "type: ignore[type-var]" comment  [unused-ignore]
+ bson/__init__.py:1366: error: Unused "type: ignore[type-var]" comment  [unused-ignore]

mitmproxy (https://github.com/mitmproxy/mitmproxy): typechecking got 1.47x slower (36.5s -> 53.7s)
(Performance measurements are based on a single noisy sample)

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you!

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 subtyping with bound typevar
2 participants