8000 add OrderedDict.{keys,values,items}().mapping · python/typeshed@9e2605a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e2605a

Browse files
committed
add OrderedDict.{keys,values,items}().mapping
1 parent 1ec6758 commit 9e2605a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stdlib/collections/__init__.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
from _typeshed import Self
3+
from builtins import _dict_items, _dict_keys, _dict_values
34
from typing import Any, Dict, Generic, NoReturn, Tuple, Type, TypeVar, overload
45

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

250-
class _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):
251+
class _OrderedDictKeysView(_dict_keys[_KT, _KT], Reversible[_KT]):
251252
def __reversed__(self) -> Iterator[_KT]: ...
252253

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

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

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

0 commit comments

Comments
 (0)
0