fix python version compat

This commit is contained in:
Cyberes 2024-01-14 12:15:17 -07:00
parent 8958481637
commit d8f94e5aa2
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,7 @@
def try_float(value: str) -> int | float | str:
from typing import Union
def try_float(value: str) -> Union[int, float, str]:
try:
return float(value)
except: