Closed
Description
Is your feature request related to a problem? Please describe.
To make it easier reading the typing it is now possible to use |
instead of Union
or Optional
.
Here's an example how it looks like in pandas:
https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py#L116-L134
Describe the solution you'd like
Replace for example:
Union[str, int]
withstr | int
Optional[str]
withNone | str
This would likely require adding from __future__ import annotations
at the top of the file.
References
https://www.python.org/dev/peps/pep-0604/