Problem
from gt4py import next as gtx
KDim = gtx.Dimension("KDim", kind=gtx.DimensionKind.VERTICAL)
@gtx.field_operator
def foo(a: gtx.Field[gtx.Dims[KDim], gtx.int32]) -> gtx.Field[gtx.Dims[KDim], gtx.int32]:
return a
leads to
error: Variable "KDim" is not valid as a type [valid-type]
This blocks client projects from type checking stencils effectively.
Proposed Solution
See #2484 for a minimal mypy plugin, which selecively ignores (treats as Any) any type hint with a name ending in "Dim".