Use class for attributes
This commit is contained in:
@ -73,3 +73,10 @@ def create_rules(commands, concat=False):
|
||||
else:
|
||||
result[f"{name}.{parameter}"] = value
|
||||
return result
|
||||
|
||||
|
||||
def str_to_float(string: str | float) -> float:
|
||||
try:
|
||||
return int(string)
|
||||
except ValueError:
|
||||
return float(str(string).replace(",", "."))
|
||||
|
||||
Reference in New Issue
Block a user