@@ -677,7 +677,7 @@ class bytes(ByteString):
677
677
def __rmul__ (self , __n : SupportsIndex ) -> bytes : ...
678
678
def __mod__ (self , __value : Any ) -> bytes : ...
679
679
# Incompatible with Sequence.__contains__
680
- def __contains__ (self , __o : SupportsIndex | bytes ) -> bool : ... # type: ignore[override]
680
+ def __contains__ (self , __o : SupportsIndex | ReadableBuffer ) -> bool : ... # type: ignore[override]
681
681
def __eq__ (self , __x : object ) -> bool : ...
682
682
def __ne__ (self , __x : object ) -> bool : ...
683
683
def __lt__ (self , __x : bytes ) -> bool : ...
@@ -798,10 +798,10 @@ class bytearray(MutableSequence[int], ByteString):
798
798
def __contains__ (self , __o : SupportsIndex | ReadableBuffer ) -> bool : ... # type: ignore[override]
799
799
def __eq__ (self , __x : object ) -> bool : ...
800
800
def __ne__ (self , __x : object ) -> bool : ...
801
- def __lt__ (self , __x : bytes ) -> bool : ...
802
- def __le__ (self , __x : bytes ) -> bool : ...
803
- def __gt__ (self , __x : bytes ) -> bool : ...
804
- def __ge__ (self , __x : bytes ) -> bool : ...
801
+ def __lt__ (self , __x : ReadableBuffer ) -> bool : ...
802
+ def __le__ (self , __x : ReadableBuffer ) -> bool : ...
803
+ def __gt__ (self , __x : ReadableBuffer ) -> bool : ...
804
+ def __ge__ (self , __x : ReadableBuffer ) -> bool : ...
805
805
def __alloc__ (self ) -> int : ...
806
806
807
807
@final
@@ -821,7 +821,7 @@ class memoryview(Sequence[int]):
821
821
@property
822
822
def ndim (self ) -> int : ...
823
823
@property
824
- def obj (self ) -> bytes | bytearray : ...
824
+ def obj (self ) -> ReadableBuffer : ...
825
825
@property
826
826
def c_contiguous (self ) -> bool : ...
827
827
@property
0 commit comments