Avoid using string literals in type annotations (#2294)

This commit is contained in:
Yusuke Miyazaki
2018-07-03 12:23:29 +09:00
committed by Jelle Zijlstra
parent 25ad95de4f
commit 6192cce9d9
50 changed files with 175 additions and 175 deletions

View File

@@ -37,10 +37,10 @@ class Fraction(Rational):
def __init__(self, value: str, *, _normalize: bool = ...) -> None: ...
@classmethod
def from_float(cls, f: float) -> 'Fraction': ...
def from_float(cls, f: float) -> Fraction: ...
@classmethod
def from_decimal(cls, dec: Decimal) -> 'Fraction': ...
def limit_denominator(self, max_denominator: int = ...) -> 'Fraction': ...
def from_decimal(cls, dec: Decimal) -> Fraction: ...
def limit_denominator(self, max_denominator: int = ...) -> Fraction: ...
@property
def numerator(self) -> int: ...
@@ -67,9 +67,9 @@ class Fraction(Rational):
def __pow__(self, other): ...
def __rpow__(self, other): ...
def __pos__(self) -> 'Fraction': ...
def __neg__(self) -> 'Fraction': ...
def __abs__(self) -> 'Fraction': ...
def __pos__(self) -> Fraction: ...
def __neg__(self) -> Fraction: ...
def __abs__(self) -> Fraction: ...
def __trunc__(self) -> int: ...
if sys.version_info >= (3, 0):
def __floor__(self) -> int: ...
@@ -90,7 +90,7 @@ class Fraction(Rational):
# Not actually defined within fractions.py, but provides more useful
# overrides
@property
def real(self) -> 'Fraction': ...
def real(self) -> Fraction: ...
@property
def imag(self) -> 'Fraction': ...
def conjugate(self) -> 'Fraction': ...
def imag(self) -> Fraction: ...
def conjugate(self) -> Fraction: ...