From c9c44fd65046fc9e5c7308e04522a9ff8562f649 Mon Sep 17 00:00:00 2001 From: Bas van Beek Date: Sun, 23 Aug 2020 18:53:44 +0200 Subject: MAINT: `SupportsIndex` was added to typing-extensions as of 3.7.4.3 --- numpy/core/function_base.pyi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'numpy/core/function_base.pyi') diff --git a/numpy/core/function_base.pyi b/numpy/core/function_base.pyi index 755fe8723..5891d640e 100644 --- a/numpy/core/function_base.pyi +++ b/numpy/core/function_base.pyi @@ -7,10 +7,7 @@ from numpy.typing import ArrayLike, DtypeLike, _SupportsArray if sys.version_info >= (3, 8): from typing import SupportsIndex, Literal else: - from typing_extensions import Literal, Protocol - - class SupportsIndex(Protocol): - def __index__(self) -> int: ... + from typing_extensions import SupportsIndex, Literal # TODO: wait for support for recursive types _ArrayLikeNested = Sequence[Sequence[Any]] -- cgit v1.2.1