mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
slices of MutableSequences are also MutableSequences (#2428)
This commit is contained in:
committed by
Jelle Zijlstra
parent
ea2122741f
commit
2e0af18dda
@@ -13,9 +13,9 @@ class UserString(Sequence[UserString]):
|
||||
def __hash__(self) -> int: ...
|
||||
def __len__(self) -> int: ...
|
||||
@overload
|
||||
def __getitem__(self: _UST, i: int) -> _UST: ...
|
||||
def __getitem__(self: _UST, i: int) -> _UST: ... # type: ignore
|
||||
@overload
|
||||
def __getitem__(self: _UST, s: slice) -> _UST: ...
|
||||
def __getitem__(self: _UST, s: slice) -> _UST: ... # type: ignore
|
||||
def __add__(self: _UST, other: Any) -> _UST: ...
|
||||
def __radd__(self: _UST, other: Any) -> _UST: ...
|
||||
def __mul__(self: _UST, other: int) -> _UST: ...
|
||||
@@ -61,7 +61,11 @@ class UserString(Sequence[UserString]):
|
||||
def upper(self: _UST) -> _UST: ...
|
||||
def zfill(self: _UST, width: int) -> _UST: ...
|
||||
|
||||
class MutableString(UserString, MutableSequence[MutableString]):
|
||||
class MutableString(UserString, MutableSequence[MutableString]): # type: ignore
|
||||
@overload
|
||||
def __getitem__(self: _MST, i: int) -> _MST: ...
|
||||
@overload
|
||||
def __getitem__(self: _MST, s: slice) -> _MST: ...
|
||||
def __setitem__(self, index: Union[int, slice], sub: Any) -> None: ...
|
||||
def __delitem__(self, index: Union[int, slice]) -> None: ...
|
||||
def immutable(self) -> UserString: ...
|
||||
|
||||
Reference in New Issue
Block a user