Add __iter__ typeshed to NestedSequence
@@ -29,6 +29,7 @@ from typing import (
TYPE_CHECKING,
TypeVar,
Protocol,
+ Iterator
)
from ._array_object import Array
@@ -51,6 +52,7 @@ _T_co = TypeVar("_T_co", covariant=True)
class NestedSequence(Protocol[_T_co]):
def __getitem__(self, key: int, /) -> _T_co | NestedSequence[_T_co]: ...
def __len__(self, /) -> int: ...
+ def __iter__(self) -> Iterator[_T_co | NestedSequence[_T_co]]: ...
if TYPE_CHECKING or sys.version_info >= (3, 9):
Dtype = dtype[Union[
