Skip to content

Further fix overload diagnostic for vararg and varkwarg #19619

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

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Aug 8, 2025

#19614 got merged faster than I expected :-)

Copy link
Contributor

github-actions bot commented Aug 8, 2025

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

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

meet can often produce <Never>, but in this case I guess it is OK.

@hauntsaninja
Copy link
Collaborator Author

Yeah, in this case I think it is desirable. If the meet is Never then I think it does mean that implementation would have wrong types depending on how it is called:

@overload
def foo(x: int) -> None: ...

def foo(*args: int, **kw: str) -> None:
    pass

@hauntsaninja hauntsaninja merged commit 186515f into python:master Aug 9, 2025
20 checks passed
@hauntsaninja hauntsaninja deleted the overmet branch August 9, 2025 04:16
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.

2 participants