Skip to content

Commit 42f3203

Browse files
committed
TST,TYP: Fix a python 3.11 failure for the GenericAlias tests
1 parent 05d9001 commit 42f3203

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/typing/tests/test_generic_alias.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
if sys.version_info >= (3, 9):
2121
DType_ref = types.GenericAlias(np.dtype, (ScalarType,))
2222
NDArray_ref = types.GenericAlias(np.ndarray, (Any, DType_ref))
23-
FuncType = Callable[[Union[_GenericAlias, types.GenericAlias]], Any]
23+
FuncType = Callable[["_GenericAlias | types.GenericAlias"], Any]
2424
else:
2525
DType_ref = Any
2626
NDArray_ref = Any
27-
FuncType = Callable[[_GenericAlias], Any]
27+
FuncType = Callable[["_GenericAlias"], Any]
2828

2929
GETATTR_NAMES = sorted(set(dir(np.ndarray)) - _GenericAlias._ATTR_EXCEPTIONS)
3030

0 commit comments

Comments
 (0)