diff --git a/xarray/namedarray/_typing.py b/xarray/namedarray/_typing.py index 92d1c1dd8c0..3cab1b2067a 100644 --- a/xarray/namedarray/_typing.py +++ b/xarray/namedarray/_typing.py @@ -177,7 +177,7 @@ def __getitem__( ) -> _arrayfunction[Any, _DType_co] | Any: ... def __array__( - self, dtype: _dtype | None = ..., / + self, dtype: _dtype[_generic] | None = ..., / ) -> np.ndarray[Any, np.dtype[np.generic]]: ... # TODO: Should return the same subclass but with a new dtype generic.