Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 9203a03

Browse files
[pre-commit.ci] pre-commit autoupdate (#218)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/isort: 5.11.4 → 5.12.0](PyCQA/isort@5.11.4...5.12.0) - [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Justus Magin <[email protected]>
1 parent 8a9b7bf commit 9203a03

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: isort
1616
# https://github.com/python/black#version-control-integration
1717
- repo: https://github.com/psf/black
18-
rev: 22.12.0
18+
rev: 23.1.0
1919
hooks:
2020
- id: black
2121
- repo: https://github.com/keewis/blackdoc

datatree/datatree.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def ds(self) -> DatasetView:
379379

380380
@ds.setter
381381
def ds(self, data: Optional[Union[Dataset, DataArray]] = None) -> None:
382-
383382
ds = _coerce_to_dataset(data)
384383

385384
_check_for_name_collisions(self.children, ds.variables)
@@ -796,7 +795,6 @@ def __getitem__(self: DataTree, key: str) -> DataTree | DataArray:
796795

797796
# Either:
798797
if utils.is_dict_like(key):
799-
800798
# dict-like indexing
801799
raise NotImplementedError("Should this index over whole tree?")
802800
elif isinstance(key, str):

datatree/io.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def _datatree_to_netcdf(
120120
unlimited_dims=None,
121121
**kwargs,
122122
):
123-
124123
if kwargs.get("format", None) not in [None, "NETCDF4"]:
125124
raise ValueError("to_netcdf only supports the NETCDF4 format")
126125

@@ -182,7 +181,6 @@ def _datatree_to_zarr(
182181
consolidated: bool = True,
183182
**kwargs,
184183
):
185-
186184
from zarr.convenience import consolidate_metadata # type: ignore
187185

188186
if kwargs.get("group", None) is not None:

datatree/tests/test_datatree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ def test_copy(self, create_test_datatree):
258258
dtt.assert_identical(dt, copied)
259259

260260
for node, copied_node in zip(dt.root.subtree, copied.root.subtree):
261-
262261
assert node.encoding == copied_node.encoding
263262
# Note: IndexVariable objects with string dtype are always
264263
# copied because of xarray.core.util.safe_cast_to_index.

0 commit comments

Comments
 (0)