Various stdlib dunders: correct parameter names; improve types; add defaults (#9761)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2023-02-19 23:44:20 +01:00
committed by GitHub
parent 74112dc189
commit c5b5dd4bf4
8 changed files with 31 additions and 23 deletions

View File

@@ -89,7 +89,7 @@ class Decimal:
def __mul__(self, __other: _Decimal) -> Decimal: ...
def __neg__(self) -> Decimal: ...
def __pos__(self) -> Decimal: ...
def __pow__(self, __other: _Decimal, __modulo: _Decimal | None = ...) -> Decimal: ...
def __pow__(self, __value: _Decimal, __mod: _Decimal | None = None) -> Decimal: ...
def __radd__(self, __other: _Decimal) -> Decimal: ...
def __rdivmod__(self, __other: _Decimal) -> tuple[Decimal, Decimal]: ...
def __rfloordiv__(self, __other: _Decimal) -> Decimal: ...
@@ -116,7 +116,7 @@ class Decimal:
def __floor__(self) -> int: ...
def __ceil__(self) -> int: ...
def fma(self, other: _Decimal, third: _Decimal, context: Context | None = None) -> Decimal: ...
def __rpow__(self, __other: _Decimal, __context: Context | None = ...) -> Decimal: ...
def __rpow__(self, __value: _Decimal, __mod: Context | None = None) -> Decimal: ...
def normalize(self, context: Context | None = None) -> Decimal: ...
def quantize(self, exp: _Decimal, rounding: str | None = None, context: Context | None = None) -> Decimal: ...
def same_quantum(self, other: _Decimal, context: Context | None = None) -> bool: ...