|  | 
| 42 | 42 | from zarr.core.chunk_key_encodings import ( | 
| 43 | 43 |     ChunkKeyEncoding, | 
| 44 | 44 |     ChunkKeyEncodingLike, | 
| 45 |  | -    ChunkKeyEncodingParams, | 
| 46 | 45 |     DefaultChunkKeyEncoding, | 
| 47 | 46 |     V2ChunkKeyEncoding, | 
| 48 | 47 | ) | 
| @@ -413,7 +412,7 @@ async def create( | 
| 413 | 412 |         # v3 only | 
| 414 | 413 |         chunk_shape: ShapeLike | None = None, | 
| 415 | 414 |         chunk_key_encoding: ( | 
| 416 |  | -            ChunkKeyEncoding | 
|  | 415 | +            ChunkKeyEncodingLike | 
| 417 | 416 |             | tuple[Literal["default"], Literal[".", "/"]] | 
| 418 | 417 |             | tuple[Literal["v2"], Literal[".", "/"]] | 
| 419 | 418 |             | None | 
| @@ -454,7 +453,7 @@ async def create( | 
| 454 | 453 |             The shape of the array's chunks | 
| 455 | 454 |             Zarr format 3 only. Zarr format 2 arrays should use `chunks` instead. | 
| 456 | 455 |             If not specified, default are guessed based on the shape and dtype. | 
| 457 |  | -        chunk_key_encoding : ChunkKeyEncoding, optional | 
|  | 456 | +        chunk_key_encoding : ChunkKeyEncodingLike, optional | 
| 458 | 457 |             A specification of how the chunk keys are represented in storage. | 
| 459 | 458 |             Zarr format 3 only. Zarr format 2 arrays should use `dimension_separator` instead. | 
| 460 | 459 |             Default is ``("default", "/")``. | 
| @@ -1761,7 +1760,7 @@ def create( | 
| 1761 | 1760 |             The shape of the Array's chunks. | 
| 1762 | 1761 |             Zarr format 3 only. Zarr format 2 arrays should use `chunks` instead. | 
| 1763 | 1762 |             If not specified, default are guessed based on the shape and dtype. | 
| 1764 |  | -        chunk_key_encoding : ChunkKeyEncoding, optional | 
|  | 1763 | +        chunk_key_encoding : ChunkKeyEncodingLike, optional | 
| 1765 | 1764 |             A specification of how the chunk keys are represented in storage. | 
| 1766 | 1765 |             Zarr format 3 only. Zarr format 2 arrays should use `dimension_separator` instead. | 
| 1767 | 1766 |             Default is ``("default", "/")``. | 
| @@ -3881,7 +3880,7 @@ async def init_array( | 
| 3881 | 3880 |         The zarr format to use when saving. | 
| 3882 | 3881 |     attributes : dict, optional | 
| 3883 | 3882 |         Attributes for the array. | 
| 3884 |  | -    chunk_key_encoding : ChunkKeyEncoding, optional | 
|  | 3883 | +    chunk_key_encoding : ChunkKeyEncodingLike, optional | 
| 3885 | 3884 |         A specification of how the chunk keys are represented in storage. | 
| 3886 | 3885 |         For Zarr format 3, the default is ``{"name": "default", "separator": "/"}}``. | 
| 3887 | 3886 |         For Zarr format 2, the default is ``{"name": "v2", "separator": "."}}``. | 
| @@ -4020,7 +4019,7 @@ async def create_array( | 
| 4020 | 4019 |     order: MemoryOrder | None = None, | 
| 4021 | 4020 |     zarr_format: ZarrFormat | None = 3, | 
| 4022 | 4021 |     attributes: dict[str, JSON] | None = None, | 
| 4023 |  | -    chunk_key_encoding: ChunkKeyEncoding | ChunkKeyEncodingParams | None = None, | 
|  | 4022 | +    chunk_key_encoding: ChunkKeyEncodingLike | None = None, | 
| 4024 | 4023 |     dimension_names: Iterable[str] | None = None, | 
| 4025 | 4024 |     storage_options: dict[str, Any] | None = None, | 
| 4026 | 4025 |     overwrite: bool = False, | 
| @@ -4102,7 +4101,7 @@ async def create_array( | 
| 4102 | 4101 |         The zarr format to use when saving. | 
| 4103 | 4102 |     attributes : dict, optional | 
| 4104 | 4103 |         Attributes for the array. | 
| 4105 |  | -    chunk_key_encoding : ChunkKeyEncoding, optional | 
|  | 4104 | +    chunk_key_encoding : ChunkKeyEncodingLike, optional | 
| 4106 | 4105 |         A specification of how the chunk keys are represented in storage. | 
| 4107 | 4106 |         For Zarr format 3, the default is ``{"name": "default", "separator": "/"}}``. | 
| 4108 | 4107 |         For Zarr format 2, the default is ``{"name": "v2", "separator": "."}}``. | 
| @@ -4175,7 +4174,7 @@ async def create_array( | 
| 4175 | 4174 | 
 | 
| 4176 | 4175 | 
 | 
| 4177 | 4176 | def _parse_chunk_key_encoding( | 
| 4178 |  | -    data: ChunkKeyEncoding | ChunkKeyEncodingParams | None, zarr_format: ZarrFormat | 
|  | 4177 | +    data: ChunkKeyEncodingLike | None, zarr_format: ZarrFormat | 
| 4179 | 4178 | ) -> ChunkKeyEncoding: | 
| 4180 | 4179 |     """ | 
| 4181 | 4180 |     Take an implicit specification of a chunk key encoding and parse it into a ChunkKeyEncoding object. | 
| @@ -4370,7 +4369,7 @@ def _parse_data_params( | 
| 4370 | 4369 |     if data is None: | 
| 4371 | 4370 |         if shape is None: | 
| 4372 | 4371 |             msg = ( | 
| 4373 |  | -                "The data parameter was set to None, but shape was not specified." | 
|  | 4372 | +                "The data parameter was set to None, but shape was not specified. " | 
| 4374 | 4373 |                 "Either provide a value for data, or specify shape." | 
| 4375 | 4374 |             ) | 
| 4376 | 4375 |             raise ValueError(msg) | 
|  | 
0 commit comments