summaryrefslogtreecommitdiff
path: root/numpy/core/function_base.pyi
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-08-23 20:43:26 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2020-08-23 20:43:26 +0200
commit68832b368d5fd69770ee09359ea8a6a4ae4aa312 (patch)
tree706b91074dee467e11536aed70c0d0d42f5d22e7 /numpy/core/function_base.pyi
parentc9c44fd65046fc9e5c7308e04522a9ff8562f649 (diff)
downloadnumpy-68832b368d5fd69770ee09359ea8a6a4ae4aa312.tar.gz
Revert "MAINT: `SupportsIndex` was added to typing-extensions as of 3.7.4.3"
This reverts commit c9c44fd65046fc9e5c7308e04522a9ff8562f649.
Diffstat (limited to 'numpy/core/function_base.pyi')
-rw-r--r--numpy/core/function_base.pyi5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/function_base.pyi b/numpy/core/function_base.pyi
index 5891d640e..755fe8723 100644
--- a/numpy/core/function_base.pyi
+++ b/numpy/core/function_base.pyi
@@ -7,7 +7,10 @@ from numpy.typing import ArrayLike, DtypeLike, _SupportsArray
if sys.version_info >= (3, 8):
from typing import SupportsIndex, Literal
else:
- from typing_extensions import SupportsIndex, Literal
+ from typing_extensions import Literal, Protocol
+
+ class SupportsIndex(Protocol):
+ def __index__(self) -> int: ...
# TODO: wait for support for recursive types
_ArrayLikeNested = Sequence[Sequence[Any]]