changed compile filename from <string> to <safe_eval> for the errors

This commit is contained in:
Faraphel 2022-08-08 18:06:25 +02:00
parent cd13753960
commit e4ea183c7f

View file

@ -116,4 +116,4 @@ def safe_eval(template: str, env: dict[str, any] = None, macros: dict[str, str]
ast.fix_missing_locations(expression) ast.fix_missing_locations(expression)
# return the evaluated formula # return the evaluated formula
return eval(compile(expression, "<string>", "eval"), globals_, locals_) return eval(compile(expression, "<safe_eval>", "eval"), globals_, locals_)