Skip to content

stubgen: Don't generate Incomplete | None = None argument annotation - #19097

Merged
JelleZijlstra merged 2 commits into
python:masterfrom
srittau:stubgen-incomplete-none
May 16, 2025
Merged

stubgen: Don't generate Incomplete | None = None argument annotation#19097
JelleZijlstra merged 2 commits into
python:masterfrom
srittau:stubgen-incomplete-none

Conversation

@srittau

@srittau srittau commented May 16, 2025

Copy link
Copy Markdown
Contributor

Fixes #19096

Comment thread mypy/stubgen.py Outdated
def x(self): ...

[case testClassWithNameIncompleteOrOptional]
[case testClassWithNameIncomplete]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Testing for Optional seemed obsolete, since we don't use typing.Optional anymore, so I removed it while I was here.

@JelleZijlstra
JelleZijlstra merged commit 8ed16d1 into python:master May 16, 2025
@srittau
srittau deleted the stubgen-incomplete-none branch May 16, 2025 17:02
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.

stubgen: Don't generate Incomplete | None = None

2 participants