mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Collection is Sized (#8977)
This commit is contained in:
@@ -805,7 +805,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __alloc__(self) -> int: ...
|
||||
|
||||
@final
|
||||
class memoryview(Sized, Sequence[int]):
|
||||
class memoryview(Sequence[int]):
|
||||
@property
|
||||
def format(self) -> str: ...
|
||||
@property
|
||||
|
||||
@@ -452,10 +452,7 @@ class Container(Protocol[_T_co]):
|
||||
def __contains__(self, __x: object) -> bool: ...
|
||||
|
||||
@runtime_checkable
|
||||
class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
|
||||
# Implement Sized (but don't have it as a base class).
|
||||
@abstractmethod
|
||||
def __len__(self) -> int: ...
|
||||
class Collection(Sized, Iterable[_T_co], Container[_T_co], Protocol[_T_co]): ...
|
||||
|
||||
class Sequence(Collection[_T_co], Reversible[_T_co], Generic[_T_co]):
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user