Skip to content

Commit 1f0c65c

Browse files
committed
pre-commit fixes
1 parent 11d59b5 commit 1f0c65c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/zarr/api/asynchronous.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
Array,
1515
AsyncArray,
1616
CompressorLike,
17-
_get_default_chunk_encoding_v2,
1817
create_array,
1918
from_array,
2019
get_array_metadata,
@@ -32,7 +31,7 @@
3231
_warn_order_kwarg,
3332
_warn_write_empty_chunks_kwarg,
3433
)
35-
from zarr.core.dtype import ZDTypeLike, get_data_type_from_native_dtype, parse_data_type
34+
from zarr.core.dtype import ZDTypeLike, get_data_type_from_native_dtype
3635
from zarr.core.group import (
3736
AsyncGroup,
3837
ConsolidatedMetadata,

src/zarr/core/array.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,10 @@ async def _create_v2(
850850
else:
851851
await ensure_no_existing_node(store_path, zarr_format=2)
852852

853+
default_filters, default_compressor = _get_default_chunk_encoding_v2(dtype)
853854
compressor_parsed: CompressorLikev2
854855
if compressor == "auto":
855-
_, compressor_parsed = _get_default_chunk_encoding_v2(dtype)
856+
compressor_parsed = default_compressor
856857
elif isinstance(compressor, BytesBytesCodec):
857858
raise ValueError(
858859
"Cannot use a BytesBytesCodec as a compressor for zarr v2 arrays. "
@@ -862,7 +863,7 @@ async def _create_v2(
862863
compressor_parsed = compressor
863864

864865
if filters is None:
865-
filters = _default_filters(dtype)
866+
filters = default_filters
866867

867868
metadata = cls._create_metadata_v2(
868869
shape=shape,

0 commit comments

Comments
 (0)