swap inheritance order for typing.Sequence (#12869)

This matches the order at runtime.
This commit is contained in:
Stephen Morton
2024-10-21 14:37:02 -07:00
committed by GitHub
parent 8b32739f13
commit b62579b0d2

View File

@@ -575,7 +575,7 @@ class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
@abstractmethod
def __len__(self) -> int: ...
class Sequence(Collection[_T_co], Reversible[_T_co]):
class Sequence(Reversible[_T_co], Collection[_T_co]):
@overload
@abstractmethod
def __getitem__(self, index: int) -> _T_co: ...