Skip to content

Commit f5cb80c

Browse files
pre-commit-ci[bot]aladinor
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6f4219c commit f5cb80c

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

xarray/backends/api.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,7 @@ async def _create_index_for_node(
427427
return tree
428428

429429

430-
async def _maybe_create_default_indexes_async(
431-
ds: Dataset, executor=None
432-
) -> Dataset:
433-
430+
async def _maybe_create_default_indexes_async(ds: Dataset, executor=None) -> Dataset:
434431
import asyncio
435432

436433
to_index_names = [

xarray/backends/zarr.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,9 +1939,7 @@ def open_datatree(
19391939
)
19401940

19411941
# Async parallel group discovery (25x faster than sync recursive)
1942-
group_paths = zarr_sync(
1943-
_iter_zarr_groups_async(zarr_group, parent=parent)
1944-
)
1942+
group_paths = zarr_sync(_iter_zarr_groups_async(zarr_group, parent=parent))
19451943

19461944
return zarr_sync(
19471945
self._open_datatree_from_stores_async(
@@ -2048,9 +2046,7 @@ def _sync_open():
20482046
if path_group == parent:
20492047
group_store = zarr_group
20502048
else:
2051-
rel_path = path_group.removeprefix(f"{parent}/").removeprefix(
2052-
"/"
2053-
)
2049+
rel_path = path_group.removeprefix(f"{parent}/").removeprefix("/")
20542050
group_store = zarr_group[rel_path]
20552051

20562052
store = ZarrStore(
@@ -2217,6 +2213,7 @@ async def open_groups_as_dict_async(
22172213
executor = ThreadPoolExecutor(
22182214
max_workers=max_workers, thread_name_prefix="xarray"
22192215
)
2216+
22202217
async def open_one(path_group: str, store) -> tuple[str, Dataset]:
22212218
store_entrypoint = StoreBackendEntrypoint()
22222219

0 commit comments

Comments
 (0)