We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fd190b + dfd672b commit 23ccce2Copy full SHA for 23ccce2
2 files changed
changes/3232.bugfix.rst
@@ -0,0 +1,3 @@
1
+Fix the type of ``ArrayV2Metadata.codec`` to constrain it to ``numcodecs.abc.Codec | None``.
2
+Previously the type was more permissive, allowing objects that can be parsed into Codecs (e.g., the codec name).
3
+The constructor of ``ArrayV2Metadata`` still allows the permissive input when creating new objects.
src/zarr/core/metadata/v2.py
@@ -68,7 +68,7 @@ class ArrayV2Metadata(Metadata):
68
order: MemoryOrder = "C"
69
filters: tuple[numcodecs.abc.Codec, ...] | None = None
70
dimension_separator: Literal[".", "/"] = "."
71
- compressor: CompressorLikev2
+ compressor: numcodecs.abc.Codec | None
72
attributes: dict[str, JSON] = field(default_factory=dict)
73
zarr_format: Literal[2] = field(init=False, default=2)
74
0 commit comments