File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from types import ModuleType
55from 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
88from .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 )
Original file line number Diff line number Diff line change 55import array_api_strict as xp
66from 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
1113def test_vendor_compat ():
@@ -56,7 +58,7 @@ def test_vendor_compat():
5658
5759
5860def 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
6769def 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
7680def 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
You can’t perform that action at this time.
0 commit comments