mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 13:33:59 +08:00
[stdlib] Update fromhex method bytes and bytesarray (#15103)
docs: https://docs.python.org/dev/library/stdtypes.html#bytes.fromhex https://docs.python.org/dev/library/stdtypes.html#bytearray.fromhex
This commit is contained in:
+14
-4
@@ -731,8 +731,13 @@ class bytes(Sequence[int]):
|
||||
def translate(self, table: ReadableBuffer | None, /, delete: ReadableBuffer = b"") -> bytes: ...
|
||||
def upper(self) -> bytes: ...
|
||||
def zfill(self, width: SupportsIndex, /) -> bytes: ...
|
||||
@classmethod
|
||||
def fromhex(cls, string: str, /) -> Self: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@classmethod
|
||||
def fromhex(cls, string: str | ReadableBuffer, /) -> Self: ...
|
||||
else:
|
||||
@classmethod
|
||||
def fromhex(cls, string: str, /) -> Self: ...
|
||||
|
||||
@staticmethod
|
||||
def maketrans(frm: ReadableBuffer, to: ReadableBuffer, /) -> bytes: ...
|
||||
def __len__(self) -> int: ...
|
||||
@@ -836,8 +841,13 @@ class bytearray(MutableSequence[int]):
|
||||
def translate(self, table: ReadableBuffer | None, /, delete: bytes = b"") -> bytearray: ...
|
||||
def upper(self) -> bytearray: ...
|
||||
def zfill(self, width: SupportsIndex, /) -> bytearray: ...
|
||||
@classmethod
|
||||
def fromhex(cls, string: str, /) -> Self: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@classmethod
|
||||
def fromhex(cls, string: str | ReadableBuffer, /) -> Self: ...
|
||||
else:
|
||||
@classmethod
|
||||
def fromhex(cls, string: str, /) -> Self: ...
|
||||
|
||||
@staticmethod
|
||||
def maketrans(frm: ReadableBuffer, to: ReadableBuffer, /) -> bytes: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user