diff --git a/stdlib/2/collections.pyi b/stdlib/2/collections.pyi index c2f0af268..3235e9bd1 100644 --- a/stdlib/2/collections.pyi +++ b/stdlib/2/collections.pyi @@ -70,9 +70,10 @@ class Counter(Dict[_T, int], Generic[_T]): @overload def update(self, m: Union[Iterable[_T], Iterable[Tuple[_T, int]]], **kwargs: _VT) -> None: ... -class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): +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]: ... class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): default_factory = ... # type: Callable[[], _VT] diff --git a/stdlib/3/collections/__init__.pyi b/stdlib/3/collections/__init__.pyi index 5cb89f7a3..0f059ec3d 100644 --- a/stdlib/3/collections/__init__.pyi +++ b/stdlib/3/collections/__init__.pyi @@ -139,10 +139,10 @@ class Counter(Dict[_T, int], Generic[_T]): def __iand__(self, other: Counter[_T]) -> Counter[_T]: ... def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... -class OrderedDict(Dict[_KT, _VT], Generic[_KT, _VT]): +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]: ... class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]): default_factory = ... # type: Callable[[], _VT]