Skip to content

Commit aa6f25b

Browse files
committed
add cast
1 parent 23b2ae7 commit aa6f25b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/zarr/core/chunk_key_encodings.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ def from_dict(cls, data: dict[str, JSON] | ChunkKeyEncodingLike) -> ChunkKeyEnco
4747
if "name" in data and "separator" in data:
4848
data = {"name": data["name"], "configuration": {"separator": data["separator"]}}
4949

50+
# TODO: remove this cast when we are statically typing the JSON metadata completely.
51+
data = cast(dict[str, JSON], data)
52+
5053
# configuration is optional for chunk key encodings
51-
# TODO: remove the type: ignore statement when we use typeddicts for all our static metadata
52-
name_parsed, config_parsed = parse_named_configuration(data, require_configuration=False) # type: ignore[arg-type]
54+
name_parsed, config_parsed = parse_named_configuration(data, require_configuration=False)
5355
if name_parsed == "default":
5456
if config_parsed is None:
5557
# for default, normalize missing configuration to use the "/" separator.

0 commit comments

Comments
 (0)