Skip to content

Commit

Permalink
Merge branch 'v3' of github.com:zarr-developers/zarr-python into arra…
Browse files Browse the repository at this point in the history
…y_on_group
  • Loading branch information
d-v-b committed Jul 22, 2024
2 parents 460bfe2 + 5b9b6c4 commit 99c15f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/zarr/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,14 @@ async def create(
cls,
store: StoreLike,
*,
attributes: dict[str, Any] = {}, # noqa: B006, FIXME
attributes: dict[str, Any] | None = None,
exists_ok: bool = False,
zarr_format: ZarrFormat = 3,
) -> AsyncGroup:
store_path = make_store_path(store)
if not exists_ok:
await ensure_no_existing_node(store_path, zarr_format=zarr_format)
attributes = attributes or {}
group = cls(
metadata=GroupMetadata(attributes=attributes, zarr_format=zarr_format),
store_path=store_path,
Expand Down Expand Up @@ -310,8 +311,9 @@ async def create_group(
self,
path: str,
exists_ok: bool = False,
attributes: dict[str, Any] = {}, # noqa: B006, FIXME
attributes: dict[str, Any] | None = None,
) -> AsyncGroup:
attributes = attributes or {}
return await type(self).create(
self.store_path / path,
attributes=attributes,
Expand Down Expand Up @@ -533,10 +535,11 @@ def create(
cls,
store: StoreLike,
*,
attributes: dict[str, Any] = {}, # noqa: B006, FIXME
attributes: dict[str, Any] | None = None,
zarr_format: ZarrFormat = 3,
exists_ok: bool = False,
) -> Group:
attributes = attributes or {}
obj = sync(
AsyncGroup.create(
store,
Expand Down

0 comments on commit 99c15f3

Please sign in to comment.