Update typing.MutableMapping.update stubs to allow keyword-only arguments (#1370)

This commit is contained in:
Semyon Proshev
2017-05-31 07:44:10 +03:00
committed by Jelle Zijlstra
parent 40c6927cf0
commit 5db571a8f3
6 changed files with 24 additions and 12 deletions

View File

@@ -138,9 +138,11 @@ class Counter(Dict[_T, int], Generic[_T]):
# Dict.update. Not sure if we should use '# type: ignore' instead
# and omit the type from the union.
@overload
def update(self, m: Mapping[_T, int], **kwargs: int) -> None: ...
def update(self, __m: Mapping[_T, int], **kwargs: int) -> None: ...
@overload
def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ...
def update(self, __m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: int) -> None: ...
@overload
def update(self, **kwargs: int) -> None: ...
def __add__(self, other: Counter[_T]) -> Counter[_T]: ...
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...