File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4588,6 +4588,7 @@ async def init_array(
4588
4588
order_parsed = zarr_config .get ("array.order" )
4589
4589
else :
4590
4590
order_parsed = order
4591
+ chunk_key_encoding_parsed = cast ("V2ChunkKeyEncoding" , chunk_key_encoding_parsed )
4591
4592
4592
4593
meta = AsyncArray ._create_metadata_v2 (
4593
4594
shape = shape_parsed ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class ChunkKeyEncoding(ABC, Metadata):
41
41
@classmethod
42
42
def from_dict (cls , data : dict [str , JSON ]) -> Self :
43
43
_ , config_parsed = parse_named_configuration (data , require_configuration = False )
44
- return cls (** config_parsed if config_parsed else {}) # type: ignore[arg-type]
44
+ return cls (** config_parsed if config_parsed else {})
45
45
46
46
def to_dict (self ) -> dict [str , JSON ]:
47
47
return {"name" : self .name , "configuration" : super ().to_dict ()}
Original file line number Diff line number Diff line change 5
5
import pathlib
6
6
from collections .abc import Mapping , Sequence
7
7
from dataclasses import dataclass , field
8
- from typing import TYPE_CHECKING
8
+ from typing import TYPE_CHECKING , cast
9
9
10
10
import numpy as np
11
11
import numpy .typing as npt
50
50
from zarr .core .chunk_key_encodings import (
51
51
ChunkKeyEncoding ,
52
52
ChunkKeyEncodingLike ,
53
+ V2ChunkKeyEncoding ,
53
54
)
54
55
from zarr .core .dtype .wrapper import ZDType
55
56
@@ -316,6 +317,7 @@ def create_array_metadata(
316
317
filters_parsed , compressor_parsed = _parse_chunk_encoding_v2 (
317
318
compressor = compressors , filters = filters , dtype = dtype_parsed
318
319
)
320
+ chunk_key_encoding_parsed = cast ("V2ChunkKeyEncoding" , chunk_key_encoding_parsed )
319
321
return ArrayV2Metadata (
320
322
shape = shape_parsed ,
321
323
dtype = dtype_parsed ,
You can’t perform that action at this time.
0 commit comments