mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
add hex to bytes, bytearray, memoryview (#507)
This commit is contained in:
@@ -280,6 +280,8 @@ class bytes(ByteString):
|
||||
def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytes: ...
|
||||
def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
@@ -352,6 +354,8 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def endswith(self, suffix: bytes) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytearray: ...
|
||||
def find(self, sub: bytes, start: int = 0, end: int = 0) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
def index(self, sub: bytes, start: int = 0, end: int = 0) -> int: ...
|
||||
def insert(self, index: int, object: int) -> None: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
@@ -419,6 +423,8 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
class memoryview():
|
||||
# TODO arg can be any obj supporting the buffer protocol
|
||||
def __init__(self, b: bytearray) -> None: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
|
||||
class bool(int, SupportsInt, SupportsFloat):
|
||||
def __init__(self, o: object = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user