diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index 400c3dc3d..0771620da 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -241,20 +241,22 @@ class deque(MutableSequence[_T], Generic[_T]): class Counter(Dict[_T, int], Generic[_T]): @overload - def __init__(self, **kwargs: int) -> None: ... + def __init__(self, __iterable: None = ..., **kwargs: int) -> None: ... @overload - def __init__(self, mapping: Mapping[_T, int]) -> None: ... + def __init__(self, __mapping: Mapping[_T, int]) -> None: ... @overload - def __init__(self, iterable: Iterable[_T]) -> None: ... + def __init__(self, __iterable: Iterable[_T]) -> None: ... def copy(self: _S) -> _S: ... def elements(self) -> Iterator[_T]: ... def most_common(self, n: Optional[int] = ...) -> List[Tuple[_T, int]]: ... + @overload + def subtract(self, __iterable: None = ...) -> None: ... @overload def subtract(self, __mapping: Mapping[_T, int]) -> None: ... @overload - def subtract(self, iterable: Iterable[_T]) -> None: ... + def subtract(self, __iterable: Iterable[_T]) -> None: ... # The Iterable[Tuple[...]] argument type is not actually desirable # (the tuples will be added as keys, breaking type safety) but @@ -266,7 +268,7 @@ class Counter(Dict[_T, int], Generic[_T]): @overload def update(self, __m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ... @overload - def update(self, **kwargs: int) -> None: ... + def update(self, __m: None = ..., **kwargs: int) -> None: ... def __add__(self, other: Counter[_T]) -> Counter[_T]: ... def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...