Skip to content

Commit 98eba47

Browse files
committed
More docstring improvements
1 parent ddc0935 commit 98eba47

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

docs/user-guide/consolidated_metadata.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,9 @@ may be for several reasons like:
128128

129129
This type of store can declare it doesn't want consolidation by implementing
130130
`Store.supports_consolidated_metadata`. For stores that don't support
131-
consolidation, Zarr will silently ignore any `consolidate_metadata` calls,
132-
maintaining the store in its unconsolidated state.
131+
consolidation, Zarr will:
132+
133+
* Raise an error on `consolidate_metadata` calls, maintaining the store in
134+
its unconsolidated state.
135+
* Raise an error in `AsyncGroup.open(..., use_consolidated=True)`
136+
* Not use consolidated metadata in `AsyncGroup.open(..., use_consolidated=None)`

src/zarr/api/asynchronous.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ async def consolidate_metadata(
196196
group: AsyncGroup
197197
The group, with the ``consolidated_metadata`` field set to include
198198
the metadata of each child node. If the Store doesn't support
199-
consolidated metadata, this is function does raises a `TypeError`.
199+
consolidated metadata, this function raises a `TypeError`.
200+
See ``Store.supports_consolidated_metadata``.
200201
"""
201202
store_path = await make_store_path(store, path=path)
202203

src/zarr/api/synchronous.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def consolidate_metadata(
102102
-------
103103
group: Group
104104
The group, with the ``consolidated_metadata`` field set to include
105-
the metadata of each child node. If the Store doesn't prefer
106-
consolidated metadata, this function does nothing and returns
107-
the group without modifications. See ``Store.supports_consolidated_metadata``.
105+
the metadata of each child node. If the Store doesn't support
106+
consolidated metadata, this function raises a `TypeError`.
107+
See ``Store.supports_consolidated_metadata``.
108108
109109
"""
110110
return Group(sync(async_api.consolidate_metadata(store, path=path, zarr_format=zarr_format)))

0 commit comments

Comments
 (0)