transonic
transonic copied to clipboard
Compatibility with `typing`, Mypy and Mypyc
-
The Transonic types defined in
transonic.typing
should be compatible with Mypy. -
It should also be possible to directly use types defined in
typing
for the simple cases (List, Dict, Set, Tuple, ...).
Now there is another (nicer) variant: https://www.python.org/dev/peps/pep-0585/, which would be / is available starting from Python 3.7:
from __future__ import annotations
def find(haystack: dict[str, list[int]]) -> int:
...
Support for mypy should be easier to implement soon with numpy>=1.20 when type hints for arrays will be supported.
https://github.com/numpy/numpy/milestone/83