Skip to content

Commit 12b9664

Browse files
author
Suren Nihalani
committed
typeshed: declare that ordereddict's copy returns ordereddict
1 parent 6a55ad5 commit 12b9664

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

stdlib/2/collections.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class Counter(Dict[_T, int], Generic[_T]):
9696
class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
9797
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
9898
def __reversed__(self) -> Iterator[_KT]: ...
99+
def __copy__(self) -> "OrderedDict[_KT, _VT]": ...
99100

100101
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
101102
default_factory = ... # type: Callable[[], _VT]

stdlib/3/collections/__init__.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
278278
def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...
279279
def move_to_end(self, key: _KT, last: bool = ...) -> None: ...
280280
def __reversed__(self) -> Iterator[_KT]: ...
281+
def __copy__(self) -> "OrderedDict[_KT, _VT]": ...
281282

282283
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
283284
default_factory = ... # type: Callable[[], _VT]

0 commit comments

Comments
 (0)