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

@@ -327,9 +327,11 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
# known to be a Mapping with unknown type parameters, which is closer
# to the behavior we want. See mypy issue #1430.
@overload
def update(self, m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
@overload
def update(self, m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
@overload
def update(self, **kwargs: _VT) -> None: ...
Text = str