Skip to content

Type alias stubgen fix #18960

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

makridenko
Copy link

@makridenko makridenko commented Apr 24, 2025

fixes #18905

TypeAlias is an unanalyzed type, but is also an alias. So I changed a little bit of checking in the visit_assignment_stmt method.

alias: TypeAlias = tuple[int, str]

[out]
alias = tuple[int, str]
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that we should skip TypeAlias here. It should be like this, in my opinion:

Suggested change
alias = tuple[int, str]
from typing import TypeAlias
alias: TypeAlias = tuple[int, str]

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 does not handle TypeAlias
2 participants