mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
builtins: improve bytes handling (#9027)
This commit is contained in:
@@ -677,7 +677,7 @@ class bytes(ByteString):
|
||||
def __rmul__(self, __n: SupportsIndex) -> bytes: ...
|
||||
def __mod__(self, __value: Any) -> bytes: ...
|
||||
# Incompatible with Sequence.__contains__
|
||||
def __contains__(self, __o: SupportsIndex | bytes) -> bool: ... # type: ignore[override]
|
||||
def __contains__(self, __o: SupportsIndex | ReadableBuffer) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, __x: object) -> bool: ...
|
||||
def __ne__(self, __x: object) -> bool: ...
|
||||
def __lt__(self, __x: bytes) -> bool: ...
|
||||
@@ -798,10 +798,10 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __contains__(self, __o: SupportsIndex | ReadableBuffer) -> bool: ... # type: ignore[override]
|
||||
def __eq__(self, __x: object) -> bool: ...
|
||||
def __ne__(self, __x: object) -> bool: ...
|
||||
def __lt__(self, __x: bytes) -> bool: ...
|
||||
def __le__(self, __x: bytes) -> bool: ...
|
||||
def __gt__(self, __x: bytes) -> bool: ...
|
||||
def __ge__(self, __x: bytes) -> bool: ...
|
||||
def __lt__(self, __x: ReadableBuffer) -> bool: ...
|
||||
def __le__(self, __x: ReadableBuffer) -> bool: ...
|
||||
def __gt__(self, __x: ReadableBuffer) -> bool: ...
|
||||
def __ge__(self, __x: ReadableBuffer) -> bool: ...
|
||||
def __alloc__(self) -> int: ...
|
||||
|
||||
@final
|
||||
@@ -821,7 +821,7 @@ class memoryview(Sequence[int]):
|
||||
@property
|
||||
def ndim(self) -> int: ...
|
||||
@property
|
||||
def obj(self) -> bytes | bytearray: ...
|
||||
def obj(self) -> ReadableBuffer: ...
|
||||
@property
|
||||
def c_contiguous(self) -> bool: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user