int.denominator, int.imag: More precise return types (#8266)

This commit is contained in:
Alex Waygood
2022-07-14 11:25:05 +01:00
committed by GitHub
parent 82745be9fc
commit 9645dae925

View File

@@ -205,11 +205,11 @@ class int:
@property
def real(self) -> int: ...
@property
def imag(self) -> int: ...
def imag(self) -> Literal[0]: ...
@property
def numerator(self) -> int: ...
@property
def denominator(self) -> int: ...
def denominator(self) -> Literal[1]: ...
def conjugate(self) -> int: ...
def bit_length(self) -> int: ...
if sys.version_info >= (3, 10):