fluiddyn / transonic

:rocket: Make your Python code fly at transonic speeds!
https://transonic.readthedocs.io
BSD 3-Clause "New" or "Revised" License
119 stars 0 forks source link

Compatibility with `typing`, Mypy and Mypyc #9

Open paugier opened 5 years ago

paugier commented 5 years ago
  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, ...).

ashwinvis commented 4 years ago

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 commented 4 years ago

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