Skip to content

Commit cb3769f

Browse files
committed
pre-commit fixes
1 parent 2013ff9 commit cb3769f

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
@@ -820,9 +820,10 @@ async def _create_v2(
820820
else:
821821
await ensure_no_existing_node(store_path, zarr_format=2)
822822

823+
default_filters, default_compressor = _get_default_chunk_encoding_v2(dtype)
823824
compressor_parsed: CompressorLikev2
824825
if compressor == "auto":
825-
_, compressor_parsed = _get_default_chunk_encoding_v2(dtype)
826+
compressor_parsed = default_compressor
826827
elif isinstance(compressor, BytesBytesCodec):
827828
raise ValueError(
828829
"Cannot use a BytesBytesCodec as a compressor for zarr v2 arrays. "
@@ -832,7 +833,7 @@ async def _create_v2(
832833
compressor_parsed = compressor
833834

834835
if filters is None:
835-
filters = _default_filters(dtype)
836+
filters = default_filters
836837

837838
metadata = cls._create_metadata_v2(
838839
shape=shape,

0 commit comments

Comments
 (0)