KEMBAR78
[PEP 695] Support Annotated[...] in new-style type aliases by JukkaL · Pull Request #17777 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Sep 17, 2024

The rvalue expression isn't semantically analyzed, so we can't rely on the fullname attribute to check if there is a reference to Annotated. Instead, use a lookup function provided by the caller to determine the fullname.

Error reporting in the second argument to Annotated is still inconsistent, but this seems lower priority. I'll create a follow-up issue about (or update an existing issue if one exists).

Fixes #17751.

The rvalue expression isn't semantically analyzed, so we can't rely
on the `fullname` attribute to check if there is a reference to
`Annotated`. Instead, use a lookup function provided by the caller
to determine the fullname.

Fixes #17751.
@github-actions

This comment has been minimized.

@JukkaL JukkaL merged commit a47f301 into master Sep 18, 2024
19 checks passed
@JukkaL JukkaL deleted the type-alias-annotated branch September 18, 2024 11:31
@github-actions
Copy link
Contributor

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

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.

type statement + Annotated == Invalid type alias

2 participants