From 7162dc3c9f3cc02434c50dfb4e55b790453c00a4 Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Sat, 5 Jun 2021 23:35:11 +0200 Subject: REV,BUG: Replace `NotImplemented` with `typing.Any` --- numpy/typing/_array_like.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/typing/_array_like.py') diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py index 2b823ecc0..187dfb96a 100644 --- a/numpy/typing/_array_like.py +++ b/numpy/typing/_array_like.py @@ -1,7 +1,7 @@ from __future__ import annotations import sys -from typing import Any, Sequence, TYPE_CHECKING, Union, TypeVar +from typing import Any, Sequence, TYPE_CHECKING, Union, TypeVar, Generic from numpy import ( ndarray, @@ -43,7 +43,7 @@ if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS: class _SupportsArray(Protocol[_DType_co]): def __array__(self) -> ndarray[Any, _DType_co]: ... else: - _SupportsArray = Any + class _SupportsArray(Generic[_DType_co]): ... # TODO: Wait for support for recursive types _NestedSequence = Union[ -- cgit v1.2.1