Skip to content

Commit c7393a4

Browse files
committed
fix mypy
1 parent 7eb6988 commit c7393a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zarr/core/array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3875,9 +3875,9 @@ async def from_array(
38753875
if order is None:
38763876
order = data.order
38773877
if chunk_key_encoding is None and zarr_format == data.metadata.zarr_format:
3878-
if zarr_format == 2:
3878+
if isinstance(data.metadata, ArrayV2Metadata):
38793879
chunk_key_encoding = {"name": "v2", "separator": data.metadata.dimension_separator}
3880-
else:
3880+
elif isinstance(data.metadata, ArrayV3Metadata):
38813881
chunk_key_encoding = data.metadata.chunk_key_encoding
38823882
if dimension_names is None and data.metadata.zarr_format == 3:
38833883
dimension_names = data.metadata.dimension_names

0 commit comments

Comments
 (0)