mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Fix collections.UserString __reversed__ and __iter__ (#5958)
This commit is contained in:
@@ -104,6 +104,8 @@ class UserString(Sequence[str]):
|
||||
def __len__(self) -> int: ...
|
||||
# It should return a str to implement Sequence correctly, but it doesn't.
|
||||
def __getitem__(self: _UserStringT, i: int | slice) -> _UserStringT: ... # type: ignore
|
||||
def __iter__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
|
||||
def __reversed__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
|
||||
def __add__(self: _UserStringT, other: object) -> _UserStringT: ...
|
||||
def __mul__(self: _UserStringT, n: int) -> _UserStringT: ...
|
||||
def __mod__(self: _UserStringT, args: Any) -> _UserStringT: ...
|
||||
|
||||
Reference in New Issue
Block a user