mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add Supports{Abs,Float,Int,Round} as base classes for Decimal. (#415)
This commit is contained in:
committed by
Matthias Kramm
parent
6701a10e93
commit
781b079f91
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from typing import Any, SupportsAbs, SupportsFloat, SupportsInt, SupportsRound
|
||||
|
||||
ROUND_DOWN = ... # type: Any
|
||||
ROUND_HALF_UP = ... # type: Any
|
||||
@@ -44,7 +44,7 @@ def setcontext(context): ...
|
||||
def getcontext(): ...
|
||||
def localcontext(ctx=None): ...
|
||||
|
||||
class Decimal:
|
||||
class Decimal(SupportsAbs, SupportsFloat, SupportsInt, SupportsRound):
|
||||
def __new__(cls, value=..., context=None): ...
|
||||
@classmethod
|
||||
def from_float(cls, f): ...
|
||||
|
||||
Reference in New Issue
Block a user