-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 604: Remove some more uses of Union/Optional #7515
Conversation
Mypy seems fine with these. Aliases that use type[] or variadic tuple[] still break mypy.
Some of these mypy is cool with on >= 3.10, but can't handle on <3.10. (I'm planning to write up bug reports soon; haven't got round to it yet.) |
This comment has been minimized.
This comment has been minimized.
Right. Looks like these are the patterns:
Still ended up with a few fixes. I didn't look at |
This comment has been minimized.
This comment has been minimized.
Of these, as far as I'm aware, only (2) is tracked over at mypy (in python/mypy#11098); (1) and (3) need to have bug reports filed. (3) is obviously only relevant to stub files, as it isn't valid syntax in |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
LGTM
I created https://github.com/python/mypy/labels/topic-pep-604 so we can track these better. Going to spend some time today organizing the mypy issue tracker. |
python/mypy#11887 (fixed for stubs but not for |
Mypy bugs for (1) and (3) have been filled: |
Thanks! |
Mypy seems fine with these. Aliases that use type[] or variadic tuple[]
still break mypy.