Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cf_xarray/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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,
Expand All @@ -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 = [
Expand Down
Loading