transonic icon indicating copy to clipboard operation
transonic copied to clipboard

Compatibility with `typing`, Mypy and Mypyc

Open paugier opened this issue 5 years ago • 2 comments

  1. The Transonic types defined in transonic.typing should be compatible with Mypy.

  2. It should also be possible to directly use types defined in typing for the simple cases (List, Dict, Set, Tuple, ...).

paugier avatar Nov 05 '19 08:11 paugier

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:
    ...

ashwinvis avatar May 27 '20 14:05 ashwinvis

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

ashwinvis avatar Jul 01 '20 12:07 ashwinvis