apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -4,14 +4,13 @@
# Note: these stubs are incomplete. The more complex type
# signatures are currently omitted. Also see numbers.pyi.
from typing import Optional, TypeVar, Union, overload, Any, Tuple
from numbers import Real, Integral, Rational
from decimal import Decimal
import sys
from decimal import Decimal
from numbers import Integral, Rational, Real
from typing import Any, Optional, Tuple, TypeVar, Union, overload
_ComparableNum = Union[int, float, Decimal, Real]
if sys.version_info < (3, 9):
@overload
def gcd(a: int, b: int) -> int: ...
@@ -22,30 +21,24 @@ if sys.version_info < (3, 9):
@overload
def gcd(a: Integral, b: Integral) -> Integral: ...
class Fraction(Rational):
@overload
def __new__(cls,
numerator: Union[int, Rational] = ...,
denominator: Optional[Union[int, Rational]] = ...,
*,
_normalize: bool = ...) -> Fraction: ...
def __new__(
cls, numerator: Union[int, Rational] = ..., denominator: Optional[Union[int, Rational]] = ..., *, _normalize: bool = ...
) -> Fraction: ...
@overload
def __new__(cls, __value: Union[float, Decimal, str], *, _normalize: bool = ...) -> Fraction: ...
@classmethod
def from_float(cls, f: float) -> Fraction: ...
@classmethod
def from_decimal(cls, dec: Decimal) -> Fraction: ...
def limit_denominator(self, max_denominator: int = ...) -> Fraction: ...
if sys.version_info >= (3, 8):
def as_integer_ratio(self) -> Tuple[int, int]: ...
@property
def numerator(self) -> int: ...
@property
def denominator(self) -> int: ...
def __add__(self, other): ...
def __radd__(self, other): ...
def __sub__(self, other): ...
@@ -65,7 +58,6 @@ class Fraction(Rational):
def __rdivmod__(self, other): ...
def __pow__(self, other): ...
def __rpow__(self, other): ...
def __pos__(self) -> Fraction: ...
def __neg__(self) -> Fraction: ...
def __abs__(self) -> Fraction: ...
@@ -74,7 +66,6 @@ class Fraction(Rational):
def __floor__(self) -> int: ...
def __ceil__(self) -> int: ...
def __round__(self, ndigits: Optional[Any] = ...): ...
def __hash__(self) -> int: ...
def __eq__(self, other: object) -> bool: ...
def __lt__(self, other: _ComparableNum) -> bool: ...
@@ -85,7 +76,6 @@ class Fraction(Rational):
def __bool__(self) -> bool: ...
else:
def __nonzero__(self) -> bool: ...
# Not actually defined within fractions.py, but provides more useful
# overrides
@property