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

This commit is contained in:
Semyon Proshev authored and Jelle Zijlstra committed 2017-05-30 21:44:10 -07:00
1 parent 40c6927cf0
commit 5db571a8f3
6 files changed
+24 -12

No files matched your search

+4 -2
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]: ...