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

@@ -87,10 +87,10 @@ class Counter(dict[_T, int], Generic[_T]):
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __and__(self, other: Counter[_T]) -> Counter[_T]: ...
def __or__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ...
def __isub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iand__(self, other: Counter[_T]) -> Counter[_T]: ...
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iadd__(self: Self, other: Counter[_T]) -> Self: ...
def __isub__(self: Self, other: Counter[_T]) -> Self: ...
def __iand__(self: Self, other: Counter[_T]) -> Self: ...
def __ior__(self: Self, other: Counter[_T]) -> Self: ...
class OrderedDict(dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
def popitem(self, last: bool = ...) -> tuple[_KT, _VT]: ...