Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions cf_xarray/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1814,10 +1814,6 @@ def _rewrite_values(
for k, v in value.items()
)
)

elif value is Ellipsis:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is unreachable because the function always_iterable never returns Ellipsis

pass

else:
# things like sum which have dim
newvalue = [
Expand Down
4 changes: 2 additions & 2 deletions cf_xarray/tests/test_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,15 +883,15 @@ 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"),
),
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)
Expand Down
Loading