Skip to content

Further fix overload diagnostic for vararg and varkwarg - #19619

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:overmet
Aug 9, 2025
Merged

hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:overmet

Conversation

@hauntsaninja

@hauntsaninja hauntsaninja commented Aug 8, 2025 •

Copy link
Copy Markdown
Collaborator

#19614 got merged faster than I expected :-)

@github-actions

github-actions Bot commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

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

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants