Skip to content

Commit ee5bc7b

Browse files
committed
fix typing
1 parent 40da541 commit ee5bc7b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/zarr/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _resolve_codec(data: dict[str, JSON]) -> Codec:
168168
return get_codec_class(data["name"]).from_dict(data) # type: ignore[arg-type]
169169

170170

171-
def numcodec_to_zarr3_codec(codec: numcodecs.abc.Codec) -> numcodecs.zarr3._NumcodecsCodec & Codec:
171+
def numcodec_to_zarr3_codec(codec: numcodecs.abc.Codec) -> Codec:
172172
"""
173173
Convert a numcodecs codec to a zarr v3 compatible numcodecs.zarr3 codec instance.
174174
"""

tests/test_codecs/test_codecs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,10 @@ def test_numcodecs_in_v3(
461461
result_v3 = zarr.registry.numcodec_to_zarr3_codec(codec_v2)
462462

463463
assert result_v3.__class__ == expected_v3_cls
464-
assert result_v3.codec_config == codec_v2.get_config()
464+
assert result_v3.to_dict()["name"] == f"numcodecs.{codec_v2.codec_id}"
465+
codec_v2_config = codec_v2.get_config()
466+
codec_v2_config.pop("id")
467+
assert result_v3.to_dict()["configuration"] == codec_v2_config
465468

466469
filters: FiltersLike = "auto"
467470
serializer: SerializerLike = "auto"

0 commit comments

Comments
 (0)