mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
builtins: fix bytearray.fromhex (#3691)
bytearray.fromhex is a classmethod, not a staticmethod Mark positional-only args in the other fromhex's
This commit is contained in:
@@ -224,7 +224,7 @@ class float:
|
||||
def hex(self) -> str: ...
|
||||
def is_integer(self) -> bool: ...
|
||||
@classmethod
|
||||
def fromhex(cls, s: str) -> float: ...
|
||||
def fromhex(cls, __s: str) -> float: ...
|
||||
|
||||
@property
|
||||
def real(self) -> float: ...
|
||||
@@ -616,7 +616,7 @@ if sys.version_info >= (3,):
|
||||
def upper(self) -> bytes: ...
|
||||
def zfill(self, __width: int) -> bytes: ...
|
||||
@classmethod
|
||||
def fromhex(cls, s: str) -> bytes: ...
|
||||
def fromhex(cls, __s: str) -> bytes: ...
|
||||
@classmethod
|
||||
def maketrans(cls, frm: bytes, to: bytes) -> bytes: ...
|
||||
|
||||
@@ -736,8 +736,8 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def translate(self, __table: str) -> bytearray: ...
|
||||
def upper(self) -> bytearray: ...
|
||||
def zfill(self, __width: int) -> bytearray: ...
|
||||
@staticmethod
|
||||
def fromhex(__string: str) -> bytearray: ...
|
||||
@classmethod
|
||||
def fromhex(cls, __string: str) -> bytearray: ...
|
||||
if sys.version_info >= (3,):
|
||||
@classmethod
|
||||
def maketrans(cls, __frm: bytes, __to: bytes) -> bytes: ...
|
||||
|
||||
@@ -224,7 +224,7 @@ class float:
|
||||
def hex(self) -> str: ...
|
||||
def is_integer(self) -> bool: ...
|
||||
@classmethod
|
||||
def fromhex(cls, s: str) -> float: ...
|
||||
def fromhex(cls, __s: str) -> float: ...
|
||||
|
||||
@property
|
||||
def real(self) -> float: ...
|
||||
@@ -616,7 +616,7 @@ if sys.version_info >= (3,):
|
||||
def upper(self) -> bytes: ...
|
||||
def zfill(self, __width: int) -> bytes: ...
|
||||
@classmethod
|
||||
def fromhex(cls, s: str) -> bytes: ...
|
||||
def fromhex(cls, __s: str) -> bytes: ...
|
||||
@classmethod
|
||||
def maketrans(cls, frm: bytes, to: bytes) -> bytes: ...
|
||||
|
||||
@@ -736,8 +736,8 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def translate(self, __table: str) -> bytearray: ...
|
||||
def upper(self) -> bytearray: ...
|
||||
def zfill(self, __width: int) -> bytearray: ...
|
||||
@staticmethod
|
||||
def fromhex(__string: str) -> bytearray: ...
|
||||
@classmethod
|
||||
def fromhex(cls, __string: str) -> bytearray: ...
|
||||
if sys.version_info >= (3,):
|
||||
@classmethod
|
||||
def maketrans(cls, __frm: bytes, __to: bytes) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user