Improve some in-place BinOp methods (#7149)

This commit is contained in:
Alex Waygood
2022-02-06 23:36:57 +00:00
committed by GitHub
parent 3b8412650e
commit a62fd92fb0
5 changed files with 14 additions and 11 deletions

View File

@@ -263,10 +263,10 @@ class Counter(dict[_T, int], Generic[_T]):
def __or__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore[override]
def __pos__(self) -> Counter[_T]: ...
def __neg__(self) -> 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]: ... # type: ignore[override]
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: ... # type: ignore[override]
if sys.version_info >= (3, 10):
def total(self) -> int: ...