Add __getnewargs__ to float, int, bool, str, bytes, unicode (#2632)

This commit is contained in:
Dave Halter
2018-11-26 10:43:12 +01:00
committed by Sebastian Rittau
parent 9c3978e337
commit 84daf7c93b
3 changed files with 15 additions and 0 deletions

View File

@@ -158,6 +158,7 @@ class int:
def __pos__(self) -> int: ...
def __invert__(self) -> int: ...
def __round__(self, ndigits: Optional[int] = ...) -> int: ...
def __getnewargs__(self) -> Tuple[int]: ...
def __eq__(self, x: object) -> bool: ...
def __ne__(self, x: object) -> bool: ...
@@ -204,6 +205,7 @@ class float:
def __rmod__(self, x: float) -> float: ...
def __rdivmod__(self, x: float) -> Tuple[float, float]: ...
def __rpow__(self, x: float) -> float: ...
def __getnewargs__(self) -> Tuple[float]: ...
@overload
def __round__(self) -> int: ...
@overload
@@ -340,6 +342,7 @@ class str(Sequence[str]):
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
def __hash__(self) -> int: ...
def __getnewargs__(self) -> Tuple[str]: ...
class bytes(ByteString):
@overload
@@ -419,6 +422,7 @@ class bytes(ByteString):
def __le__(self, x: bytes) -> bool: ...
def __gt__(self, x: bytes) -> bool: ...
def __ge__(self, x: bytes) -> bool: ...
def __getnewargs__(self) -> Tuple[bytes]: ...
class bytearray(MutableSequence[int], ByteString):
@overload
@@ -566,6 +570,7 @@ class bool(int):
def __rxor__(self, x: bool) -> bool: ...
@overload # type: ignore
def __rxor__(self, x: int) -> int: ...
def __getnewargs__(self) -> Tuple[int]: ...
class slice:
start = ... # type: Optional[int]