Skip to content

Use upper bounds as fallback solutions for inference#16184

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-unsatisfied-bound
Sep 27, 2023
Merged

Use upper bounds as fallback solutions for inference#16184
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:fix-unsatisfied-bound

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #13220

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

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