diff options
| author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2022-05-20 02:42:37 +0200 |
|---|---|---|
| committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2022-05-20 02:42:37 +0200 |
| commit | 42f3203a45231b338cf1a4c77fe81ca4b7fef4ef (patch) | |
| tree | 6c0d806cc085cc73df99f7a320064e0e2febd73e /numpy/typing | |
| parent | 05d90012f4e5dca5f425e4e4f8007b3ef24ff47b (diff) | |
| download | numpy-42f3203a45231b338cf1a4c77fe81ca4b7fef4ef.tar.gz | |
TST,TYP: Fix a python 3.11 failure for the `GenericAlias` tests
Diffstat (limited to 'numpy/typing')
| -rw-r--r-- | numpy/typing/tests/test_generic_alias.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/typing/tests/test_generic_alias.py b/numpy/typing/tests/test_generic_alias.py index 52d3deae4..267230a95 100644 --- a/numpy/typing/tests/test_generic_alias.py +++ b/numpy/typing/tests/test_generic_alias.py @@ -20,11 +20,11 @@ NDArray = _GenericAlias(np.ndarray, (Any, DType)) if sys.version_info >= (3, 9): DType_ref = types.GenericAlias(np.dtype, (ScalarType,)) NDArray_ref = types.GenericAlias(np.ndarray, (Any, DType_ref)) - FuncType = Callable[[Union[_GenericAlias, types.GenericAlias]], Any] + FuncType = Callable[["_GenericAlias | types.GenericAlias"], Any] else: DType_ref = Any NDArray_ref = Any - FuncType = Callable[[_GenericAlias], Any] + FuncType = Callable[["_GenericAlias"], Any] GETATTR_NAMES = sorted(set(dir(np.ndarray)) - _GenericAlias._ATTR_EXCEPTIONS) |
