-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add check for alternative union syntax - PEP 604 #4075
Add check for alternative union syntax - PEP 604 #4075
Conversation
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.
I just would really like to use the new syntax in a project I frequently contribute to that just upgraded to min Python |
@Pierre-Sassoulas Can you also tag it with |
Steps
doc/whatsnew/<current release.rst>
.Description
Add check for correct usage of alternative union syntax (PEP 604).
Example Python 3.7 - 3.9
Example Python 3.10+
Links
https://www.python.org/dev/peps/pep-0604/
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-x-y-syntax-for-unions
https://mypy.readthedocs.io/en/stable/runtime_troubles.html#future-annotations
Type of Changes
Related Issue
Closes #4065