Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Support PEP 604 types #153

Closed
s-knibbs opened this issue Jan 24, 2021 · 0 comments · Fixed by #154
Closed

Support PEP 604 types #153

s-knibbs opened this issue Jan 24, 2021 · 0 comments · Fixed by #154
Labels
enhancement New feature or request

Comments

@s-knibbs
Copy link
Owner

Mypy 0.800 now supports PEP 604. To make use of this here for python < 3.10, we'd need to re-implement get_type_hints from the typing module and use an ast transformation to turn this:

str | int | None

into this:

typing.Union[str, int, NoneType]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant