typeshed: declare that ordereddict's copy returns ordereddict (#1656)

This commit is contained in:
Suren Nihalani
2017-10-08 21:15:11 -07:00
committed by Jelle Zijlstra
parent 51829c1bc8
commit 898299969c
2 changed files with 2 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ class Counter(Dict[_T, int], Generic[_T]):
class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
def __reversed__(self) -> Iterator[_KT]: ...
def __copy__(self) -> OrderedDict[_KT, _VT]: ...
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
default_factory = ... # type: Callable[[], _VT]

View File

@@ -278,6 +278,7 @@ class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
def move_to_end(self, key: _KT, last: bool = ...) -> None: ...
def __reversed__(self) -> Iterator[_KT]: ...
def __copy__(self) -> OrderedDict[_KT, _VT]: ...
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
default_factory = ... # type: Callable[[], _VT]