adjusting syntax to support python 3.10

pull/234/head
Andrew Mirsky 2025-06-25 18:07:51 -04:00
rodzic 4ee3ece28b
commit 9b8a1d59a1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A98E67635CDF2C39
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -144,6 +144,6 @@ def int_to_bytes_str(value: int) -> bytes:
def float_to_bytes_str(value: float, places:int=3) -> bytes:
"""Convert an float value to a bytes array containing the numeric character."""
quant = Decimal(f"0.{"".join(['0' for i in range(places-1)])}1")
quant = Decimal(f"0.{''.join(['0' for i in range(places-1)])}1")
rounded = Decimal(value).quantize(quant, rounding=ROUND_HALF_UP)
return str(rounded).encode("utf-8")