KEMBAR78
Do not prioritize ParamSpec signatures during overload resolution by sterliakov · Pull Request #18033 · python/mypy · GitHub
Skip to content

Conversation

sterliakov
Copy link
Collaborator

Closes #18027.

Var-args and star-args overloads are handled first to handle functions like zip correctly in cases like zip(*[[1],[2],[3]]). That does not seem to be necessary in case of ParamSpec overloads (or at least such use case is much less obvious).

So this PR prevents ParamSpec overloads from floating up in the list of overload targets.

@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!

@JukkaL JukkaL merged commit 1cb8cc4 into python:master Oct 25, 2024
18 checks passed
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.

[1.12, 1.13 regression] typing.overload and ParamSpec

2 participants