mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add __getnewargs__ to float, int, bool, str, bytes, unicode (#2632)
This commit is contained in:
committed by
Sebastian Rittau
parent
9c3978e337
commit
84daf7c93b
@@ -139,6 +139,7 @@ class int:
|
||||
def __neg__(self) -> int: ...
|
||||
def __pos__(self) -> int: ...
|
||||
def __invert__(self) -> int: ...
|
||||
def __getnewargs__(self) -> Tuple[int]: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
@@ -187,6 +188,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]: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
@@ -328,6 +330,7 @@ class unicode(basestring, Sequence[unicode]):
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __getnewargs__(self) -> Tuple[unicode]: ...
|
||||
|
||||
class str(basestring, Sequence[str]):
|
||||
def __init__(self, object: object = ...) -> None: ...
|
||||
@@ -418,6 +421,7 @@ class str(basestring, Sequence[str]):
|
||||
def __gt__(self, x: unicode) -> bool: ...
|
||||
def __ge__(self, x: unicode) -> bool: ...
|
||||
def __mod__(self, x: Any) -> str: ...
|
||||
def __getnewargs__(self) -> Tuple[str]: ...
|
||||
|
||||
class bytearray(MutableSequence[int]):
|
||||
@overload
|
||||
@@ -524,6 +528,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(object):
|
||||
start = ... # type: Optional[int]
|
||||
|
||||
@@ -139,6 +139,7 @@ class int:
|
||||
def __neg__(self) -> int: ...
|
||||
def __pos__(self) -> int: ...
|
||||
def __invert__(self) -> int: ...
|
||||
def __getnewargs__(self) -> Tuple[int]: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
@@ -187,6 +188,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]: ...
|
||||
|
||||
def __eq__(self, x: object) -> bool: ...
|
||||
def __ne__(self, x: object) -> bool: ...
|
||||
@@ -328,6 +330,7 @@ class unicode(basestring, Sequence[unicode]):
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __getnewargs__(self) -> Tuple[unicode]: ...
|
||||
|
||||
class str(basestring, Sequence[str]):
|
||||
def __init__(self, object: object = ...) -> None: ...
|
||||
@@ -418,6 +421,7 @@ class str(basestring, Sequence[str]):
|
||||
def __gt__(self, x: unicode) -> bool: ...
|
||||
def __ge__(self, x: unicode) -> bool: ...
|
||||
def __mod__(self, x: Any) -> str: ...
|
||||
def __getnewargs__(self) -> Tuple[str]: ...
|
||||
|
||||
class bytearray(MutableSequence[int]):
|
||||
@overload
|
||||
@@ -524,6 +528,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(object):
|
||||
start = ... # type: Optional[int]
|
||||
|
||||
Reference in New Issue
Block a user