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:
Shantanu
2020-01-30 18:58:36 -08:00
committed by GitHub
parent 9798c243c9
commit 70f0dc1491
2 changed files with 8 additions and 8 deletions

View File

@@ -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: ...

View File

@@ -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: ...