Rename `float_digits()` -> `dec_digits()`, since decimal.
parent
c68f240376
commit
2a5c13bcde
|
@ -69,8 +69,9 @@ AssetTypeName: Literal[
|
||||||
# egs. stock, futer, option, bond etc.
|
# egs. stock, futer, option, bond etc.
|
||||||
|
|
||||||
|
|
||||||
def float_digits(
|
def dec_digits(
|
||||||
value: float,
|
value: float | str | Decimal,
|
||||||
|
|
||||||
) -> int:
|
) -> int:
|
||||||
'''
|
'''
|
||||||
Return the number of precision digits read from a decimal or float
|
Return the number of precision digits read from a decimal or float
|
||||||
|
@ -85,6 +86,9 @@ def float_digits(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
float_digits = dec_digits
|
||||||
|
|
||||||
|
|
||||||
def digits_to_dec(
|
def digits_to_dec(
|
||||||
ndigits: int,
|
ndigits: int,
|
||||||
) -> Decimal:
|
) -> Decimal:
|
||||||
|
|
Loading…
Reference in New Issue