From aa549db5e5e57ee2702899d1cc660163b52171ed Mon Sep 17 00:00:00 2001 From: Manuel Krebber Date: Tue, 27 Sep 2016 19:07:57 +0200 Subject: [PATCH] Added missing operations to collections.Counter stub. (#575) --- stdlib/3/collections/__init__.pyi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index e3260eae3..f93990b62 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -108,6 +108,17 @@ class Counter(Dict[_T, int], Generic[_T]): @overload def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]]) -> None: ... + def __add__(self, other: Counter[_T]) -> Counter[_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 __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]: ... + class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ... def move_to_end(self, key: _KT, last: bool = ...) -> None: ...