From c7e3e9890d775d1d641a4ec36d6fd0a46b8cf759 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 27 Apr 2018 14:38:00 -0700 Subject: [PATCH] add UserDict.__init__ for Python 3 (#2083) Fixes #2075 --- stdlib/3/collections/__init__.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index e68807c91..9c9f0cb0a 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -65,7 +65,8 @@ else: _UserDictT = TypeVar('_UserDictT', bound=UserDict) class UserDict(MutableMapping[_KT, _VT]): - data = ... # type: Mapping[_KT, _VT] + data: Mapping[_KT, _VT] + def __init__(self, dict: Optional[Mapping[_KT, _VT]] = ..., **kwargs: _VT) -> None: ... def __len__(self) -> int: ... def __getitem__(self, key: _KT) -> _VT: ... def __setitem__(self, key: _KT, item: _VT) -> None: ...