mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
decimal: kwargs to localcontext() (#7686)
This commit is contained in:
@@ -52,7 +52,23 @@ class FloatOperation(DecimalException, TypeError): ...
|
||||
|
||||
def setcontext(__context: Context) -> None: ...
|
||||
def getcontext() -> Context: ...
|
||||
def localcontext(ctx: Context | None = ...) -> _ContextManager: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
def localcontext(
|
||||
ctx: Context | None = ...,
|
||||
*,
|
||||
prec: int | None = ...,
|
||||
rounding: str | None = ...,
|
||||
Emin: int | None = ...,
|
||||
Emax: int | None = ...,
|
||||
capitals: int | None = ...,
|
||||
clamp: int | None = ...,
|
||||
traps: dict[_TrapType, bool] | None = ...,
|
||||
flags: dict[_TrapType, bool] | None = ...,
|
||||
) -> _ContextManager: ...
|
||||
|
||||
else:
|
||||
def localcontext(ctx: Context | None = ...) -> _ContextManager: ...
|
||||
|
||||
class Decimal:
|
||||
def __new__(cls: type[Self], value: _DecimalNew = ..., context: Context | None = ...) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user