diff --git a/cf_xarray/accessor.py b/cf_xarray/accessor.py index 2a370890..52d525b5 100644 --- a/cf_xarray/accessor.py +++ b/cf_xarray/accessor.py @@ -39,8 +39,8 @@ ) try: - from xarray.core.weighted import ( - Weighted, # type:ignore[import-not-found,no-redef,unused-ignore] + from xarray.core.weighted import ( # type:ignore[import-not-found,no-redef,unused-ignore] + Weighted, ) except ImportError: from xarray.computation.weighted import ( # type:ignore[import-not-found,no-redef,unused-ignore] @@ -1376,7 +1376,7 @@ def _get_all_cell_measures(self): def curvefit( self, - coords: Hashable | DataArray | Iterable[Hashable | DataArray], + coords: Hashable | Iterable[Hashable], func: Callable[..., Any], reduce_dims: Hashable | Iterable[Hashable] | None = None, skipna: bool = True, @@ -1386,8 +1386,8 @@ def curvefit( kwargs: dict[str, Any] | None = None, ): if coords is not None: - if isinstance(coords, Hashable | DataArray): - coords_iter: Iterable[Hashable | DataArray] = [coords] + if isinstance(coords, Hashable): + coords_iter: Iterable[Hashable] = [coords] else: coords_iter = coords coords = [