Skip to content

Conversation

sterliakov
Copy link
Collaborator

@sterliakov sterliakov commented Jul 21, 2025

Fixes #19480. This does not fix the root of the problem, but current logic seems to work well enough to keep as-is, at least until we have an inference engine that can handle multiple alternative constraints ("any of") in some more reliable way.

This should not cause any new false positives: previously a template with paramspec could only be matched against an overload item with *args, **kwargs of some shape, and that will still be matched.

This comment has been minimized.

@sterliakov sterliakov marked this pull request as ready for review July 21, 2025 17:55
Copy link
Contributor

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

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.

Assignability of overloaded implementation to Proto[**P](Protocol) is overload-order-sensitive
1 participant