Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stdlib/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from types import (
UnionType,
WrapperDescriptorType,
)
from typing_extensions import Never as _Never, deprecated
from typing_extensions import Never as _Never, deprecated, disjoint_base as _disjoint_base

if sys.version_info >= (3, 14):
from _typeshed import EvaluateFunc
Expand Down Expand Up @@ -678,6 +678,7 @@ class Collection(Iterable[_T_co], Container[Any], Protocol[_T_co]):
@abstractmethod
def __len__(self) -> int: ...

@_disjoint_base
class Sequence(Reversible[_T_co], Collection[_T_co]):
@overload
@abstractmethod
Expand Down Expand Up @@ -804,6 +805,7 @@ class ValuesView(MappingView, Collection[_VT_co]):
# but dict and types.MappingProxyType (the vast majority of Mapping types)
# don't allow keyword arguments.

@_disjoint_base
class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
# TODO: We wish the key type could also be covariant, but that doesn't work,
# see discussion in https://github.com/python/typing/pull/273.
Expand Down
Loading