From 59f56356bf319eb6c8485776f0d7a6fec8230b19 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Fri, 20 Jun 2025 12:07:08 -0600 Subject: [PATCH] Fix types --- cf_xarray/accessor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 = [