From b00d04b9c4478e76120081752c001311b415bfb3 Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Wed, 1 Apr 2026 17:10:31 +0200 Subject: [PATCH] Fix type hints --- cf_xarray/accessor.py | 4 ---- cf_xarray/tests/test_accessor.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cf_xarray/accessor.py b/cf_xarray/accessor.py index 94467000..2a508a0e 100644 --- a/cf_xarray/accessor.py +++ b/cf_xarray/accessor.py @@ -1814,10 +1814,6 @@ def _rewrite_values( for k, v in value.items() ) ) - - elif value is Ellipsis: - pass - else: # things like sum which have dim newvalue = [ diff --git a/cf_xarray/tests/test_accessor.py b/cf_xarray/tests/test_accessor.py index b9ef3ed9..334c8f8c 100644 --- a/cf_xarray/tests/test_accessor.py +++ b/cf_xarray/tests/test_accessor.py @@ -883,7 +883,7 @@ def test_add_bounds_nd_variable() -> None: # 2D expected = ( - vertices_to_bounds( # type: ignore[misc] + vertices_to_bounds( xr.DataArray( np.arange(0, 13, 3).reshape(5, 1) + np.arange(-2, 2).reshape(1, 4), dims=("x", "y"), @@ -891,7 +891,7 @@ def test_add_bounds_nd_variable() -> None: out_dims=("bounds", "x", "y"), ) .rename("z_bounds") - .assign_coords(**ds.coords) + .assign_coords(**ds.coords) # type: ignore[arg-type] ) actual = ds.cf.add_bounds("z").z_bounds.reset_coords(drop=True) xr.testing.assert_identical(actual, expected)