mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 14:46:55 +08:00
@@ -793,9 +793,7 @@ class _dict_keys(KeysView[_KT_co], Generic[_KT_co, _VT_co]):
|
||||
if sys.version_info >= (3, 10):
|
||||
mapping: MappingProxyType[_KT_co, _VT_co]
|
||||
|
||||
# The generics are the wrong way around because of a mypy limitation
|
||||
# https://github.com/python/mypy/issues/11138
|
||||
class _dict_values(ValuesView[_VT_co], Generic[_VT_co, _KT_co]):
|
||||
class _dict_values(ValuesView[_VT_co], Generic[_KT_co, _VT_co]):
|
||||
if sys.version_info >= (3, 10):
|
||||
mapping: MappingProxyType[_KT_co, _VT_co]
|
||||
|
||||
@@ -828,7 +826,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
@overload
|
||||
def update(self, **kwargs: _VT) -> None: ...
|
||||
def keys(self) -> _dict_keys[_KT, _VT]: ...
|
||||
def values(self) -> _dict_values[_VT, _KT]: ...
|
||||
def values(self) -> _dict_values[_KT, _VT]: ...
|
||||
def items(self) -> _dict_items[_KT, _VT]: ...
|
||||
@classmethod
|
||||
@overload
|
||||
|
||||
@@ -244,9 +244,7 @@ class _OrderedDictKeysView(_dict_keys[_KT_co, _VT_co], Reversible[_KT_co]):
|
||||
class _OrderedDictItemsView(_dict_items[_KT_co, _VT_co], Reversible[Tuple[_KT_co, _VT_co]]):
|
||||
def __reversed__(self) -> Iterator[tuple[_KT_co, _VT_co]]: ...
|
||||
|
||||
# The generics are the wrong way around because of a mypy limitation
|
||||
# https://github.com/python/mypy/issues/11138
|
||||
class _OrderedDictValuesView(_dict_values[_VT_co, _KT_co], Reversible[_VT_co], Generic[_VT_co, _KT_co]):
|
||||
class _OrderedDictValuesView(_dict_values[_KT_co, _VT_co], Reversible[_VT_co], Generic[_KT_co, _VT_co]):
|
||||
def __reversed__(self) -> Iterator[_VT_co]: ...
|
||||
|
||||
class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
|
||||
@@ -256,7 +254,7 @@ class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
|
||||
def __reversed__(self) -> Iterator[_KT]: ...
|
||||
def keys(self) -> _OrderedDictKeysView[_KT, _VT]: ...
|
||||
def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...
|
||||
def values(self) -> _OrderedDictValuesView[_VT, _KT]: ...
|
||||
def values(self) -> _OrderedDictValuesView[_KT, _VT]: ...
|
||||
|
||||
class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
|
||||
default_factory: Callable[[], _VT] | None
|
||||
|
||||
Reference in New Issue
Block a user