mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add special case for integers raised to a power of 2 (#4473)
This commit is contained in:
@@ -220,6 +220,9 @@ class int:
|
||||
def __rtruediv__(self, x: int) -> float: ...
|
||||
def __rmod__(self, x: int) -> int: ...
|
||||
def __rdivmod__(self, x: int) -> Tuple[int, int]: ...
|
||||
@overload
|
||||
def __pow__(self, __x: Literal[2], __modulo: Optional[int] = ...) -> int: ...
|
||||
@overload
|
||||
def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ... # Return type can be int or float, depending on x.
|
||||
def __rpow__(self, x: int, mod: Optional[int] = ...) -> Any: ...
|
||||
def __and__(self, n: int) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user