API refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-07 16:25:52 +09:00
parent 76d0d86211
commit 91c7e04474
1171 changed files with 81940 additions and 44117 deletions

View File

@@ -1,4 +1,5 @@
import math
from typing import Union
INF = float("inf")
MINUS_INF = float("-inf")
@@ -22,3 +23,14 @@ def floatToGoString(d):
mantissa = f'{s[0]}.{s[1:dot]}{s[dot + 1:]}'.rstrip('0.')
return f'{mantissa}e+0{dot - 1}'
return s
def parse_version(version_str: str) -> tuple[Union[int, str], ...]:
version: list[Union[int, str]] = []
for part in version_str.split('.'):
try:
version.append(int(part))
except ValueError:
version.append(part)
return tuple(version)