Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes/3232.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix the type of ``ArrayV2Metadata.codec`` to constrain it to ``numcodecs.abc.Codec | None``.
Previously the type was more permissive, allowing objects that can be parsed into Codecs (e.g., the codec name).
The constructor of ``ArrayV2Metadata`` still allows the permissive input when creating new objects.
2 changes: 1 addition & 1 deletion src/zarr/core/metadata/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ArrayV2Metadata(Metadata):
order: MemoryOrder = "C"
filters: tuple[numcodecs.abc.Codec, ...] | None = None
dimension_separator: Literal[".", "/"] = "."
compressor: CompressorLikev2
compressor: numcodecs.abc.Codec | None
attributes: dict[str, JSON] = field(default_factory=dict)
zarr_format: Literal[2] = field(init=False, default=2)

Expand Down