-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
"Union" is not replaced with "|" in user-defined type hints #645
Comments
simon-liebehenschel
changed the title
pep 604 typing rewrites"
"pep 604 typing rewrites" does not support annotated variables
May 23, 2022
simon-liebehenschel
changed the title
"pep 604 typing rewrites" does not support annotated variables
"Union" is not replaced with "|" in user-defined type hints
May 23, 2022
this was intentionally omitted because type checkers did not support it |
Should the behavior in pyupgrade be changed now that mypy supports the PEP604 syntax python/mypy#9880, so that user-defined type-hints with |
perhaps! feel free to send a tested patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample code:
Current result:
No changes
Expected result
pre-commit config:
I've tried to search over open and closed issues, but I found nothing. If it is an expected behavior, then it will be nice to document this.
The text was updated successfully, but these errors were encountered: