Skip to content

Commit fac9e17

Browse files
committed
rename argumnent
1 parent f10ba22 commit fac9e17

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/zarr/core/array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4131,12 +4131,12 @@ def _parse_chunk_encoding_v3(
41314131

41324132

41334133
def _parse_deprecated_compressor(
4134-
compressor: CompressorLike | None, compressors: CompressorsLike, version: int = 3
4134+
compressor: CompressorLike | None, compressors: CompressorsLike, zarr_format: int = 3
41354135
) -> CompressorsLike | None:
41364136
if compressor != "auto":
41374137
if compressors != "auto":
41384138
raise ValueError("Cannot specify both `compressor` and `compressors`.")
4139-
if version == 3:
4139+
if zarr_format == 3:
41404140
warn(
41414141
"The `compressor` argument is deprecated. Use `compressors` instead.",
41424142
category=UserWarning,
@@ -4147,6 +4147,6 @@ def _parse_deprecated_compressor(
41474147
compressors = ()
41484148
else:
41494149
compressors = (compressor,)
4150-
elif version == 2 and compressor == compressors == "auto":
4150+
elif zarr_format == 2 and compressor == compressors == "auto":
41514151
compressors = ({"id": "blosc"},)
41524152
return compressors

src/zarr/core/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ async def create_array(
11151115
11161116
"""
11171117
compressors = _parse_deprecated_compressor(
1118-
compressor, compressors, version=self.metadata.zarr_format
1118+
compressor, compressors, zarr_format=self.metadata.zarr_format
11191119
)
11201120
return await create_array(
11211121
store=self.store_path,
@@ -2348,7 +2348,7 @@ def create_array(
23482348
AsyncArray
23492349
"""
23502350
compressors = _parse_deprecated_compressor(
2351-
compressor, compressors, version=self.metadata.zarr_format
2351+
compressor, compressors, zarr_format=self.metadata.zarr_format
23522352
)
23532353
return Array(
23542354
self._sync(

0 commit comments

Comments
 (0)