Skip to content

Commit 23ed263

Browse files
committed
proper passing of keyword args for deep copy, other test fixes
1 parent 131dc78 commit 23ed263

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

xarray/core/datatree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ def encoding(self, value: Mapping) -> None:
897897
self._encoding = dict(value)
898898

899899
@property
900-
def dims(self) -> Mapping[Hashable, int]:
900+
def dims(self) -> Frozen[Hashable, int]:
901901
"""Mapping from dimension names to lengths.
902902
903903
Cannot be modified directly, but is updated when adding new variables.

xarray/core/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def __iter__(self) -> Iterator[Hashable]: ...
149149

150150
def copy(
151151
self,
152+
*,
152153
deep: bool = False,
153154
) -> Self: ...
154155

xarray/tests/test_datatree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2907,7 +2907,7 @@ def test_align_mixed_types_raises(self) -> None:
29072907
ds = Dataset(coords={"x": [0, 1]})
29082908

29092909
with pytest.raises(TypeError, match="Cannot align DataTree"):
2910-
xr.align(tree, ds) # type: ignore[arg-type]
2910+
xr.align(tree, ds)
29112911

29122912
def test_align_already_aligned(self) -> None:
29132913
tree1 = DataTree.from_dict(

0 commit comments

Comments
 (0)