mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -53,7 +53,7 @@ def getcontext() -> Context: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
def localcontext(
|
||||
ctx: Context | None = ...,
|
||||
ctx: Context | None = None,
|
||||
*,
|
||||
prec: int | None = ...,
|
||||
rounding: str | None = ...,
|
||||
@@ -73,10 +73,10 @@ class Decimal:
|
||||
@classmethod
|
||||
def from_float(cls: type[Self], __f: float) -> Self: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def compare(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def compare(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def as_tuple(self) -> DecimalTuple: ...
|
||||
def as_integer_ratio(self) -> tuple[int, int]: ...
|
||||
def to_eng_string(self, context: Context | None = ...) -> str: ...
|
||||
def to_eng_string(self, context: Context | None = None) -> str: ...
|
||||
def __abs__(self) -> Decimal: ...
|
||||
def __add__(self, __other: _Decimal) -> Decimal: ...
|
||||
def __divmod__(self, __other: _Decimal) -> tuple[Decimal, Decimal]: ...
|
||||
@@ -100,7 +100,7 @@ class Decimal:
|
||||
def __rtruediv__(self, __other: _Decimal) -> Decimal: ...
|
||||
def __sub__(self, __other: _Decimal) -> Decimal: ...
|
||||
def __truediv__(self, __other: _Decimal) -> Decimal: ...
|
||||
def remainder_near(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def remainder_near(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def __float__(self) -> float: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __trunc__(self) -> int: ...
|
||||
@@ -116,53 +116,53 @@ class Decimal:
|
||||
def __round__(self, __ndigits: int) -> Decimal: ...
|
||||
def __floor__(self) -> int: ...
|
||||
def __ceil__(self) -> int: ...
|
||||
def fma(self, other: _Decimal, third: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def fma(self, other: _Decimal, third: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def __rpow__(self, __other: _Decimal, __context: Context | None = ...) -> Decimal: ...
|
||||
def normalize(self, context: Context | None = ...) -> Decimal: ...
|
||||
def quantize(self, exp: _Decimal, rounding: str | None = ..., context: Context | None = ...) -> Decimal: ...
|
||||
def same_quantum(self, other: _Decimal, context: Context | None = ...) -> bool: ...
|
||||
def to_integral_exact(self, rounding: str | None = ..., context: Context | None = ...) -> Decimal: ...
|
||||
def to_integral_value(self, rounding: str | None = ..., context: Context | None = ...) -> Decimal: ...
|
||||
def to_integral(self, rounding: str | None = ..., context: Context | None = ...) -> Decimal: ...
|
||||
def sqrt(self, context: Context | None = ...) -> Decimal: ...
|
||||
def max(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def min(self, other: _Decimal, context: Context | 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: ...
|
||||
def to_integral_exact(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ...
|
||||
def to_integral_value(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ...
|
||||
def to_integral(self, rounding: str | None = None, context: Context | None = None) -> Decimal: ...
|
||||
def sqrt(self, context: Context | None = None) -> Decimal: ...
|
||||
def max(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def min(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def adjusted(self) -> int: ...
|
||||
def canonical(self) -> Decimal: ...
|
||||
def compare_signal(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def compare_total(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def compare_total_mag(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def compare_signal(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def compare_total(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def compare_total_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def copy_abs(self) -> Decimal: ...
|
||||
def copy_negate(self) -> Decimal: ...
|
||||
def copy_sign(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def exp(self, context: Context | None = ...) -> Decimal: ...
|
||||
def copy_sign(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def exp(self, context: Context | None = None) -> Decimal: ...
|
||||
def is_canonical(self) -> bool: ...
|
||||
def is_finite(self) -> bool: ...
|
||||
def is_infinite(self) -> bool: ...
|
||||
def is_nan(self) -> bool: ...
|
||||
def is_normal(self, context: Context | None = ...) -> bool: ...
|
||||
def is_normal(self, context: Context | None = None) -> bool: ...
|
||||
def is_qnan(self) -> bool: ...
|
||||
def is_signed(self) -> bool: ...
|
||||
def is_snan(self) -> bool: ...
|
||||
def is_subnormal(self, context: Context | None = ...) -> bool: ...
|
||||
def is_subnormal(self, context: Context | None = None) -> bool: ...
|
||||
def is_zero(self) -> bool: ...
|
||||
def ln(self, context: Context | None = ...) -> Decimal: ...
|
||||
def log10(self, context: Context | None = ...) -> Decimal: ...
|
||||
def logb(self, context: Context | None = ...) -> Decimal: ...
|
||||
def logical_and(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def logical_invert(self, context: Context | None = ...) -> Decimal: ...
|
||||
def logical_or(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def logical_xor(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def max_mag(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def min_mag(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def next_minus(self, context: Context | None = ...) -> Decimal: ...
|
||||
def next_plus(self, context: Context | None = ...) -> Decimal: ...
|
||||
def next_toward(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def number_class(self, context: Context | None = ...) -> str: ...
|
||||
def ln(self, context: Context | None = None) -> Decimal: ...
|
||||
def log10(self, context: Context | None = None) -> Decimal: ...
|
||||
def logb(self, context: Context | None = None) -> Decimal: ...
|
||||
def logical_and(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def logical_invert(self, context: Context | None = None) -> Decimal: ...
|
||||
def logical_or(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def logical_xor(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def max_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def min_mag(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def next_minus(self, context: Context | None = None) -> Decimal: ...
|
||||
def next_plus(self, context: Context | None = None) -> Decimal: ...
|
||||
def next_toward(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def number_class(self, context: Context | None = None) -> str: ...
|
||||
def radix(self) -> Decimal: ...
|
||||
def rotate(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def scaleb(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def shift(self, other: _Decimal, context: Context | None = ...) -> Decimal: ...
|
||||
def rotate(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def scaleb(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def shift(self, other: _Decimal, context: Context | None = None) -> Decimal: ...
|
||||
def __reduce__(self: Self) -> tuple[type[Self], tuple[str]]: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, __memo: Any) -> Self: ...
|
||||
@@ -259,7 +259,7 @@ class Context:
|
||||
def normalize(self, __x: _Decimal) -> Decimal: ...
|
||||
def number_class(self, __x: _Decimal) -> str: ...
|
||||
def plus(self, __x: _Decimal) -> Decimal: ...
|
||||
def power(self, a: _Decimal, b: _Decimal, modulo: _Decimal | None = ...) -> Decimal: ...
|
||||
def power(self, a: _Decimal, b: _Decimal, modulo: _Decimal | None = None) -> Decimal: ...
|
||||
def quantize(self, __x: _Decimal, __y: _Decimal) -> Decimal: ...
|
||||
def radix(self) -> Decimal: ...
|
||||
def remainder(self, __x: _Decimal, __y: _Decimal) -> Decimal: ...
|
||||
|
||||
Reference in New Issue
Block a user