Backport more Self-related changes to Python 2 (#7166)

This commit is contained in:
Alex Waygood
2022-02-08 17:52:43 +00:00
committed by GitHub
parent 2381066c15
commit 5f830d023f
8 changed files with 29 additions and 32 deletions

View File

@@ -1,7 +1,5 @@
from _typeshed import Self
from typing import Any, Iterable, MutableSequence, Sequence, Text, TypeVar, overload
_MST = TypeVar("_MST", bound=MutableString)
from typing import Any, Iterable, MutableSequence, Sequence, Text, overload
class UserString(Sequence[UserString]):
data: unicode
@@ -70,5 +68,5 @@ class MutableString(UserString, MutableSequence[MutableString]):
def __delitem__(self, index: int | slice) -> None: ...
def immutable(self) -> UserString: ...
def __iadd__(self: Self, other: Any) -> Self: ...
def __imul__(self, n: int) -> _MST: ...
def __imul__(self: Self, n: int) -> Self: ...
def insert(self, index: int, value: Any) -> None: ...