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

Fix Field type annoations in gt4py.next #1415

Open
havogt opened this issue Jan 18, 2024 · 0 comments
Open

Fix Field type annoations in gt4py.next #1415

havogt opened this issue Jan 18, 2024 · 0 comments
Labels
gt4py.next Issues concerning the new version with support for non-cartesian grids. triage: enhancement New feature or request

Comments

@havogt
Copy link
Contributor

havogt commented Jan 18, 2024

  • Change Field[[A,B,C], DType] typing annotations to a syntactically valid form (Field[Dims[A,B,C], DType]) to avoid many mypy complaints in our code, and also as preparation for using variadic generics from PEP 646.
    • Current annotation style should be still supported to avoid breaking user codes (it should be marked as deprecated at some point).
    • For now, Dims could be just an alias for Tuple.
    • FOAST and PAST parsers need to be updated to support the new annotations.
    • Probably Dimension implementation should be changed to be actual classes to avoid mypy errors and even get some meaningful typing errors for free.
@havogt havogt added triage: enhancement New feature or request gt4py.next Issues concerning the new version with support for non-cartesian grids. labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gt4py.next Issues concerning the new version with support for non-cartesian grids. triage: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant