Skip to content

Commit

Permalink
add OrderedDict.{keys,values,items}().mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Sep 17, 2021
1 parent 1ec6758 commit 9e2605a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stdlib/collections/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
from _typeshed import Self
from builtins import _dict_items, _dict_keys, _dict_values
from typing import Any, Dict, Generic, NoReturn, Tuple, Type, TypeVar, overload

if sys.version_info >= (3, 10):
Expand Down Expand Up @@ -247,13 +248,13 @@ class Counter(Dict[_T, int], Generic[_T]):
def __iand__(self, other: Counter[_T]) -> Counter[_T]: ...
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore

class _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):
class _OrderedDictKeysView(_dict_keys[_KT, _KT], Reversible[_KT]):
def __reversed__(self) -> Iterator[_KT]: ...

class _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):
class _OrderedDictItemsView(_dict_items[_KT, _VT], Reversible[Tuple[_KT, _VT]]):
def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...

class _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):
class _OrderedDictValuesView(_dict_values[_KT, _VT], Reversible[_VT]):
def __reversed__(self) -> Iterator[_VT]: ...

class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
Expand Down

0 comments on commit 9e2605a

Please sign in to comment.