mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Improve stubs for sequence types (#6386)
This commit is contained in:
@@ -424,7 +424,7 @@ class str(Sequence[str]):
|
||||
def __contains__(self, __o: str) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, __x: object) -> bool: ...
|
||||
def __ge__(self, __x: str) -> bool: ...
|
||||
def __getitem__(self, __i: int | slice) -> str: ...
|
||||
def __getitem__(self, __i: SupportsIndex | slice) -> str: ...
|
||||
def __gt__(self, __x: str) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
@@ -740,7 +740,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, __x: object) -> bool: ...
|
||||
@overload
|
||||
def __getitem__(self, __x: int) -> _T_co: ...
|
||||
def __getitem__(self, __x: SupportsIndex) -> _T_co: ...
|
||||
@overload
|
||||
def __getitem__(self, __x: slice) -> Tuple[_T_co, ...]: ...
|
||||
def __iter__(self) -> Iterator[_T_co]: ...
|
||||
|
||||
Reference in New Issue
Block a user