-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
PEP 695: Add detection and error reporting for the use of incorrect expressions within the scope of a type parameter and a type alias #17560
Conversation
This seems incomplete because it detects these cases only at the top level, not anywhere within the expression. For example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you need a recursive visitor for this.
This comment has been minimized.
This comment has been minimized.
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, one last nit :)
Co-authored-by: sobolevn <[email protected]>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Congrats on your first mypy PR :)
I will leave it open for a couple of days for others to have a potential feedback.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
This fixes part of #15238: