diff --git a/builtins/2.7/__builtin__.pyi b/builtins/2.7/__builtin__.pyi index cbb94f9..a3d0a80 100644 --- a/builtins/2.7/__builtin__.pyi +++ b/builtins/2.7/__builtin__.pyi @@ -521,8 +521,11 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): def pop(self, k: _KT, default: _VT = ...) -> _VT: ... def popitem(self) -> Tuple[_KT, _VT]: ... def setdefault(self, k: _KT, default: _VT = ...) -> _VT: ... + @overload def update(self, m: Union[Mapping[_KT, _VT], Iterable[Tuple[_KT, _VT]]]) -> None: ... + @overload + def update(self, **kwds: _VT) -> None: ... # TODO: _KT must be str def keys(self) -> List[_KT]: ... def values(self) -> List[_VT]: ... def items(self) -> List[Tuple[_KT, _VT]]: ... diff --git a/stdlib/2.7/collections.pyi b/stdlib/2.7/collections.pyi index ab40403..05da6ea 100644 --- a/stdlib/2.7/collections.pyi +++ b/stdlib/2.7/collections.pyi @@ -68,9 +68,12 @@ class Counter(Dict[_T, int], Generic[_T]): # it's included so that the signature is compatible with # Dict.update. Not sure if we should use '# type: ignore' instead # and omit the type from the union. + @overload def update(self, m: Union[Mapping[_T, int], Iterable[Tuple[_T, int]], Iterable[_T]]) -> None: ... + @overload + def update(self, **kwds: int): ... # TODO: _T must be str class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...