Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with typing, Mypy and Mypyc #9

Open
paugier opened this issue Nov 5, 2019 · 2 comments
Open

Compatibility with typing, Mypy and Mypyc #9

paugier opened this issue Nov 5, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@paugier
Copy link
Member

paugier commented Nov 5, 2019

  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 paugier added the enhancement New feature or request label Nov 5, 2019
@ashwinvis
Copy link
Member

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants