@@ -65,7 +65,7 @@ class Underflow(Inexact, Rounded, Subnormal): ...
6565class FloatOperation (DecimalException , TypeError ): ...
6666
6767class Decimal :
68- def __new__ (cls , value : _DecimalNew = ... , context : Context | None = ... ) -> Self : ...
68+ def __new__ (cls , value : _DecimalNew = "0" , context : Context | None = None ) -> Self : ...
6969 @classmethod
7070 def from_float (cls , f : float , / ) -> Self : ...
7171 def __bool__ (self ) -> bool : ...
@@ -163,12 +163,12 @@ class Decimal:
163163 def __reduce__ (self ) -> tuple [type [Self ], tuple [str ]]: ...
164164 def __copy__ (self ) -> Self : ...
165165 def __deepcopy__ (self , memo : Any , / ) -> Self : ...
166- def __format__ (self , specifier : str , context : Context | None = ... , / ) -> str : ...
166+ def __format__ (self , specifier : str , context : Context | None = None , / ) -> str : ...
167167
168168class Context :
169169 # TODO: Context doesn't allow you to delete *any* attributes from instances of the class at runtime,
170170 # even settable attributes like `prec` and `rounding`,
171- # but that's inexpressable in the stub.
171+ # but that's inexpressible in the stub.
172172 # Type checkers either ignore it or misinterpret it
173173 # if you add a `def __delattr__(self, name: str, /) -> NoReturn` method to the stub
174174 prec : int
@@ -181,14 +181,14 @@ class Context:
181181 flags : dict [_TrapType , bool ]
182182 def __init__ (
183183 self ,
184- prec : int | None = ... ,
185- rounding : str | None = ... ,
186- Emin : int | None = ... ,
187- Emax : int | None = ... ,
188- capitals : int | None = ... ,
189- clamp : int | None = ... ,
190- flags : None | dict [_TrapType , bool ] | Container [_TrapType ] = ... ,
191- traps : None | dict [_TrapType , bool ] | Container [_TrapType ] = ... ,
184+ prec : int | None = None ,
185+ rounding : str | None = None ,
186+ Emin : int | None = None ,
187+ Emax : int | None = None ,
188+ capitals : int | None = None ,
189+ clamp : int | None = None ,
190+ flags : dict [_TrapType , bool ] | Container [_TrapType ] | None = None ,
191+ traps : dict [_TrapType , bool ] | Container [_TrapType ] | None = None ,
192192 ) -> None : ...
193193 def __reduce__ (self ) -> tuple [type [Self ], tuple [Any , ...]]: ...
194194 def clear_flags (self ) -> None : ...
0 commit comments