Skip to content

Commit 1c6044b

Browse files
committed
remove unused method from group and corresponding test
1 parent bd5eb13 commit 1c6044b

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/zarr/core/group.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ async def _save_metadata(self, ensure_parents: bool = False) -> None:
781781
).items()
782782
]
783783
)
784-
785784
await asyncio.gather(*awaitables)
786785

787786
@property
@@ -1420,17 +1419,6 @@ def __setitem__(self, key: str, value: Any) -> None:
14201419
def __repr__(self) -> str:
14211420
return f"<Group {self.store_path}>"
14221421

1423-
async def update_attributes_async(self, new_attributes: dict[str, Any]) -> Group:
1424-
new_metadata = replace(self.metadata, attributes=new_attributes)
1425-
1426-
# Write new metadata
1427-
to_save = new_metadata.to_buffer_dict(default_buffer_prototype())
1428-
awaitables = [set_or_delete(self.store_path / key, value) for key, value in to_save.items()]
1429-
await asyncio.gather(*awaitables)
1430-
1431-
async_group = replace(self._async_group, metadata=new_metadata)
1432-
return replace(self, _async_group=async_group)
1433-
14341422
@property
14351423
def store_path(self) -> StorePath:
14361424
return self._async_group.store_path

tests/test_group.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -579,19 +579,6 @@ def test_group_update_attributes(store: Store, zarr_format: ZarrFormat) -> None:
579579
assert new_group.attrs == new_attrs
580580

581581

582-
@pytest.mark.parametrize("store", ["local", "memory", "remote", "zip"], indirect=True)
583-
async def test_group_update_attributes_async(store: Store, zarr_format: ZarrFormat) -> None:
584-
"""
585-
Test the behavior of `Group.update_attributes_async`
586-
"""
587-
attrs = {"foo": 100}
588-
group = Group.from_store(store, zarr_format=zarr_format, attributes=attrs)
589-
assert group.attrs == attrs
590-
new_attrs = {"bar": 100}
591-
new_group = await group.update_attributes_async(new_attrs)
592-
assert new_group.attrs == new_attrs
593-
594-
595582
@pytest.mark.parametrize("method", ["create_array", "array"])
596583
@pytest.mark.parametrize("store", ["local", "memory", "remote", "zip"], indirect=True)
597584
def test_group_create_array(

0 commit comments

Comments
 (0)