mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
typeshed: declare that ordereddict's copy returns ordereddict (#1656)
This commit is contained in:
committed by
Jelle Zijlstra
parent
51829c1bc8
commit
898299969c
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user