summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/typing/_nested_sequence.py5
-rw-r--r--numpy/typing/tests/data/reveal/nested_sequence.pyi1
2 files changed, 2 insertions, 4 deletions
diff --git a/numpy/typing/_nested_sequence.py b/numpy/typing/_nested_sequence.py
index e3b8fc33f..a853303ca 100644
--- a/numpy/typing/_nested_sequence.py
+++ b/numpy/typing/_nested_sequence.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-import sys
from typing import (
Any,
Iterator,
@@ -86,8 +85,6 @@ class _NestedSequence(Protocol[_T_co]):
"""Return the number of occurrences of `value`."""
raise NotImplementedError
- def index(
- self, value: Any, start: int = 0, stop: int = sys.maxsize, /
- ) -> int:
+ def index(self, value: Any, /) -> int:
"""Return the first index of `value`."""
raise NotImplementedError
diff --git a/numpy/typing/tests/data/reveal/nested_sequence.pyi b/numpy/typing/tests/data/reveal/nested_sequence.pyi
index 07e24e357..4d3aad467 100644
--- a/numpy/typing/tests/data/reveal/nested_sequence.pyi
+++ b/numpy/typing/tests/data/reveal/nested_sequence.pyi
@@ -21,3 +21,4 @@ reveal_type(func(e)) # E: None
reveal_type(func(f)) # E: None
reveal_type(func(g)) # E: None
reveal_type(func(h)) # E: None
+reveal_type(func(range(15))) # E: None