mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
stdlib: correct many pos-or-kw arg names in dunder methods (#7451)
This commit is contained in:
@@ -40,87 +40,87 @@ class Fraction(Rational):
|
||||
@property
|
||||
def denominator(self) -> int: ...
|
||||
@overload
|
||||
def __add__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __add__(self, b: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __add__(self, other: float) -> float: ...
|
||||
def __add__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __add__(self, other: complex) -> complex: ...
|
||||
def __add__(self, b: complex) -> complex: ...
|
||||
@overload
|
||||
def __radd__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __radd__(self, a: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __radd__(self, other: float) -> float: ...
|
||||
def __radd__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __radd__(self, other: complex) -> complex: ...
|
||||
def __radd__(self, a: complex) -> complex: ...
|
||||
@overload
|
||||
def __sub__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __sub__(self, b: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __sub__(self, other: float) -> float: ...
|
||||
def __sub__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __sub__(self, other: complex) -> complex: ...
|
||||
def __sub__(self, b: complex) -> complex: ...
|
||||
@overload
|
||||
def __rsub__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __rsub__(self, a: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __rsub__(self, other: float) -> float: ...
|
||||
def __rsub__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __rsub__(self, other: complex) -> complex: ...
|
||||
def __rsub__(self, a: complex) -> complex: ...
|
||||
@overload
|
||||
def __mul__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __mul__(self, b: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __mul__(self, other: float) -> float: ...
|
||||
def __mul__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __mul__(self, other: complex) -> complex: ...
|
||||
def __mul__(self, b: complex) -> complex: ...
|
||||
@overload
|
||||
def __rmul__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __rmul__(self, a: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __rmul__(self, other: float) -> float: ...
|
||||
def __rmul__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __rmul__(self, other: complex) -> complex: ...
|
||||
def __rmul__(self, a: complex) -> complex: ...
|
||||
@overload
|
||||
def __truediv__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __truediv__(self, b: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __truediv__(self, other: float) -> float: ...
|
||||
def __truediv__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __truediv__(self, other: complex) -> complex: ...
|
||||
def __truediv__(self, b: complex) -> complex: ...
|
||||
@overload
|
||||
def __rtruediv__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __rtruediv__(self, a: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __rtruediv__(self, other: float) -> float: ...
|
||||
def __rtruediv__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __rtruediv__(self, other: complex) -> complex: ...
|
||||
def __rtruediv__(self, a: complex) -> complex: ...
|
||||
@overload
|
||||
def __floordiv__(self, other: int | Fraction) -> int: ...
|
||||
def __floordiv__(self, b: int | Fraction) -> int: ...
|
||||
@overload
|
||||
def __floordiv__(self, other: float) -> float: ...
|
||||
def __floordiv__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __rfloordiv__(self, other: int | Fraction) -> int: ...
|
||||
def __rfloordiv__(self, a: int | Fraction) -> int: ...
|
||||
@overload
|
||||
def __rfloordiv__(self, other: float) -> float: ...
|
||||
def __rfloordiv__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __mod__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __mod__(self, b: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __mod__(self, other: float) -> float: ...
|
||||
def __mod__(self, b: float) -> float: ...
|
||||
@overload
|
||||
def __rmod__(self, other: int | Fraction) -> Fraction: ...
|
||||
def __rmod__(self, a: int | Fraction) -> Fraction: ...
|
||||
@overload
|
||||
def __rmod__(self, other: float) -> float: ...
|
||||
def __rmod__(self, a: float) -> float: ...
|
||||
@overload
|
||||
def __divmod__(self, other: int | Fraction) -> tuple[int, Fraction]: ...
|
||||
def __divmod__(self, b: int | Fraction) -> tuple[int, Fraction]: ...
|
||||
@overload
|
||||
def __divmod__(self, other: float) -> tuple[float, Fraction]: ...
|
||||
def __divmod__(self, b: float) -> tuple[float, Fraction]: ...
|
||||
@overload
|
||||
def __rdivmod__(self, other: int | Fraction) -> tuple[int, Fraction]: ...
|
||||
def __rdivmod__(self, a: int | Fraction) -> tuple[int, Fraction]: ...
|
||||
@overload
|
||||
def __rdivmod__(self, other: float) -> tuple[float, Fraction]: ...
|
||||
def __rdivmod__(self, a: float) -> tuple[float, Fraction]: ...
|
||||
@overload
|
||||
def __pow__(self, other: int) -> Fraction: ...
|
||||
def __pow__(self, b: int) -> Fraction: ...
|
||||
@overload
|
||||
def __pow__(self, other: float | Fraction) -> float: ...
|
||||
def __pow__(self, b: float | Fraction) -> float: ...
|
||||
@overload
|
||||
def __pow__(self, other: complex) -> complex: ...
|
||||
def __pow__(self, b: complex) -> complex: ...
|
||||
@overload
|
||||
def __rpow__(self, other: int | float | Fraction) -> float: ...
|
||||
def __rpow__(self, a: int | float | Fraction) -> float: ...
|
||||
@overload
|
||||
def __rpow__(self, other: complex) -> complex: ...
|
||||
def __rpow__(self, a: complex) -> complex: ...
|
||||
def __pos__(self) -> Fraction: ...
|
||||
def __neg__(self) -> Fraction: ...
|
||||
def __abs__(self) -> Fraction: ...
|
||||
@@ -132,11 +132,11 @@ class Fraction(Rational):
|
||||
@overload
|
||||
def __round__(self, ndigits: int) -> Fraction: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __lt__(self, other: _ComparableNum) -> bool: ...
|
||||
def __gt__(self, other: _ComparableNum) -> bool: ...
|
||||
def __le__(self, other: _ComparableNum) -> bool: ...
|
||||
def __ge__(self, other: _ComparableNum) -> bool: ...
|
||||
def __eq__(self, b: object) -> bool: ...
|
||||
def __lt__(self, b: _ComparableNum) -> bool: ...
|
||||
def __gt__(self, b: _ComparableNum) -> bool: ...
|
||||
def __le__(self, b: _ComparableNum) -> bool: ...
|
||||
def __ge__(self, b: _ComparableNum) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: Any) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user