mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Avoid using string literals in type annotations (#2294)
This commit is contained in:
committed by
Jelle Zijlstra
parent
25ad95de4f
commit
6192cce9d9
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user