Skip to content

Commit 4b40f2e

Browse files
committed
fix import of arraylike
1 parent d828ac7 commit 4b40f2e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/test_api/test_asynchronous.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@
22

33
import json
44
from dataclasses import dataclass
5+
from typing import TYPE_CHECKING
56

67
import numpy as np
78
import pytest
89

910
from zarr import create_array
10-
from zarr.api.asynchronous import ArrayLike, _get_shape_chunks, _like_args, open
11+
from zarr.api.asynchronous import _get_shape_chunks, _like_args, open
1112
from zarr.core.buffer.core import default_buffer_prototype
1213

14+
if TYPE_CHECKING:
15+
from typing import Any
16+
17+
import numpy.typing as npt
18+
19+
from zarr.core.array import Array, AsyncArray
20+
from zarr.core.metadata import ArrayV2Metadata, ArrayV3Metadata
21+
1322

1423
@dataclass
1524
class WithShape:
@@ -70,7 +79,10 @@ def test_get_shape_chunks(
7079
),
7180
],
7281
)
73-
def test_like_args(observed: ArrayLike, expected: object) -> None:
82+
def test_like_args(
83+
observed: AsyncArray[ArrayV2Metadata] | AsyncArray[ArrayV3Metadata] | Array | npt.NDArray[Any],
84+
expected: object,
85+
) -> None:
7486
"""
7587
Test the like_args function
7688
"""

0 commit comments

Comments
 (0)