diff --git a/src/awkward/_nplikes/typetracer.py b/src/awkward/_nplikes/typetracer.py index 728f8ed0c6..867b6d7bdf 100644 --- a/src/awkward/_nplikes/typetracer.py +++ b/src/awkward/_nplikes/typetracer.py @@ -502,19 +502,19 @@ def __dlpack__(self, stream: Any = None) -> Any: raise RuntimeError("cannot realise an unknown value") -def _scalar_type_of(obj) -> numpy.dtype: +def _scalar_type_of(obj) -> DType: if is_unknown_scalar(obj): return obj.dtype else: return numpy.obj2sctype(obj) -def try_touch_data(array): +def try_touch_data(array: Any): if isinstance(array, TypeTracerArray): array.touch_data() -def try_touch_shape(array): +def try_touch_shape(array: Any): if isinstance(array, TypeTracerArray): array.touch_shape()