Skip to content

Commit 322918a

Browse files
authored
Apply suggestions from code review
1 parent 0b1dedc commit 322918a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/zarr/api/asynchronous.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ async def open(
228228
"""
229229
zarr_format = _handle_zarr_version_or_format(zarr_version=zarr_version, zarr_format=zarr_format)
230230

231-
store_path = await make_store_path(store, mode=mode)
231+
store_path = await make_store_path(store, mode=mode, storage_options=storage_options)
232232

233233
if path is not None:
234234
store_path = store_path / path
@@ -323,7 +323,7 @@ async def save_array(
323323
)
324324

325325
mode = kwargs.pop("mode", None)
326-
store_path = await make_store_path(store, mode=mode)
326+
store_path = await make_store_path(store, mode=mode, storage_options=storage_options)
327327
if path is not None:
328328
store_path = store_path / path
329329
new = await AsyncArray.create(
@@ -502,7 +502,7 @@ async def group(
502502

503503
mode = None if isinstance(store, Store) else cast(AccessModeLiteral, "a")
504504

505-
store_path = await make_store_path(store, mode=mode)
505+
store_path = await make_store_path(store, mode=mode, storage_options=storage_options)
506506
if path is not None:
507507
store_path = store_path / path
508508

@@ -780,7 +780,7 @@ async def create(
780780
if not isinstance(store, Store | StorePath):
781781
mode = "a"
782782

783-
store_path = await make_store_path(store, mode=mode)
783+
store_path = await make_store_path(store, mode=mode, storage_options=storage_options)
784784
if path is not None:
785785
store_path = store_path / path
786786

@@ -957,9 +957,7 @@ async def open_array(
957957

958958
mode = kwargs.pop("mode", None)
959959
store_path = await make_store_path(store, mode=mode)
960-
if (
961-
path is not None
962-
): # FIXME: apply path before opening store in w or risk deleting existing data
960+
if path is not None:
963961
store_path = store_path / path
964962

965963
zarr_format = _handle_zarr_version_or_format(zarr_version=zarr_version, zarr_format=zarr_format)

src/zarr/core/array.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,6 @@ def chunks_initialized(array: Array | AsyncArray) -> tuple[str, ...]:
23852385
def _build_parents(node: AsyncArray | AsyncGroup) -> list[AsyncGroup]:
23862386
from zarr.core.group import AsyncGroup, GroupMetadata
23872387

2388-
print("path", node.store_path.path)
23892388

23902389
if "/" in node.store_path.path:
23912390
required_parts = node.store_path.path.split("/")[:-1]

0 commit comments

Comments
 (0)