Skip to content

Commit 3eaebea

Browse files
committed
iter
1 parent af81672 commit 3eaebea

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

vendor_tests/_array_api_compat_vendor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from types import ModuleType
55
from typing import Any
66

7-
from .array_api_compat import * # noqa: F403
7+
from .array_api_compat import * # type: ignore[import-not-found] # noqa: F403
88
from .array_api_compat import array_namespace as array_namespace_compat
99

1010

1111
# Let unit tests check with `is` that we are picking up the function from this module
1212
# and not from the original array_api_compat module.
13-
def array_namespace(*xs: Any | complex | None, **kwargs) -> ModuleType: # type: ignore[no-redef] # numpydoc ignore=GL08
13+
def array_namespace(*xs: Any | complex | None, **kwargs) -> ModuleType: # pyrefly: ignore[unannotated-parameter] # numpydoc ignore=GL08
1414
return array_namespace_compat(*xs, **kwargs)

vendor_tests/test_vendor.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import array_api_strict as xp
66
from numpy.testing import assert_array_equal
77

8-
from vendor_tests.array_api_compat.common._typing import Array
8+
from vendor_tests.array_api_compat.common._typing import ( # type: ignore[import-not-found]
9+
Array,
10+
)
911

1012

1113
def test_vendor_compat():
@@ -56,7 +58,7 @@ def test_vendor_compat():
5658

5759

5860
def test_vendor_extra():
59-
from .array_api_extra import atleast_nd
61+
from .array_api_extra import atleast_nd # type: ignore[import-not-found]
6062

6163
x = xp.asarray(1)
6264
x = cast(Array, x)
@@ -65,7 +67,9 @@ def test_vendor_extra():
6567

6668

6769
def test_vendor_extra_testing():
68-
from .array_api_extra.testing import lazy_xp_function
70+
from .array_api_extra.testing import ( # type: ignore[import-not-found]
71+
lazy_xp_function,
72+
)
6973

7074
def f(x: Any) -> Any:
7175
return x
@@ -75,6 +79,8 @@ def f(x: Any) -> Any:
7579

7680
def test_vendor_extra_uses_vendor_compat():
7781
from ._array_api_compat_vendor import array_namespace as n1
78-
from .array_api_extra._lib._utils._compat import array_namespace as n2
82+
from .array_api_extra._lib._utils._compat import ( # type: ignore[import-not-found]
83+
array_namespace as n2,
84+
)
7985

8086
assert n1 is n2

0 commit comments

Comments
 (0)