Add __complex__ to complex and __bytes__ to bytes for Python 3.11 (#6369)

This commit is contained in:
Pavel Karateev
2021-11-24 00:28:53 +03:00
committed by GitHub
parent a0f4740d54
commit b459329cec

View File

@@ -347,6 +347,8 @@ class complex:
def __abs__(self) -> float: ...
def __hash__(self) -> int: ...
def __bool__(self) -> bool: ...
if sys.version_info >= (3, 11):
def __complex__(self) -> complex: ...
class _FormatMapMapping(Protocol):
def __getitem__(self, __key: str) -> Any: ...
@@ -536,6 +538,8 @@ class bytes(ByteString):
def __gt__(self, __x: bytes) -> bool: ...
def __ge__(self, __x: bytes) -> bool: ...
def __getnewargs__(self) -> tuple[bytes]: ...
if sys.version_info >= (3, 11):
def __bytes__(self) -> bytes: ...
class bytearray(MutableSequence[int], ByteString):
@overload