Skip to content

Commit 87e4a82

Browse files
committed
Fix deprecated zarr_version kwarg
1 parent 85a2adb commit 87e4a82

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/mdio/core/v1/_overloads.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ def to_mdio(
2323
**kwargs: Mapping[str, str | int | float | bool],
2424
) -> None:
2525
"""Alias for `.to_zarr()`."""
26-
# Ensure zarr_version=2 by default unless explicitly overridden
27-
zarr_version = kwargs.get("zarr_version", 2)
28-
if zarr_version != 2: # noqa: PLR2004
29-
msg = "MDIO only supports zarr_version=2"
26+
# Ensure zarr_format=2 by default unless explicitly overridden
27+
zarr_format = kwargs.get("zarr_format", 2)
28+
if zarr_format != 2: # noqa: PLR2004
29+
msg = "MDIO only supports zarr_format=2"
3030
raise ValueError(msg)
31-
kwargs["zarr_version"] = zarr_version
31+
kwargs["zarr_format"] = zarr_format
3232
return super().to_zarr(*args, store=store, **kwargs)
3333

3434

@@ -44,12 +44,12 @@ def to_mdio(
4444
**kwargs: Mapping[str, str | int | float | bool],
4545
) -> None:
4646
"""Alias for `.to_zarr()`, and writes to Zarr store."""
47-
# Ensure zarr_version=2 by default unless explicitly overridden
48-
zarr_version = kwargs.get("zarr_version", 2)
49-
if zarr_version != 2: # noqa: PLR2004
50-
msg = "MDIO only supports zarr_version=2"
47+
# Ensure zarr_format=2 by default unless explicitly overridden
48+
zarr_format = kwargs.get("zarr_format", 2)
49+
if zarr_format != 2: # noqa: PLR2004
50+
msg = "MDIO only supports zarr_format=2"
5151
raise ValueError(msg)
52-
kwargs["zarr_version"] = zarr_version
52+
kwargs["zarr_format"] = zarr_format
5353
return super().to_zarr(*args, store=store, **kwargs)
5454

5555

0 commit comments

Comments
 (0)