import math to make it usable

This commit is contained in:
Lilian 2023-02-28 15:01:08 +01:00 committed by Kilton937342
parent 9cce9e6d67
commit 339f18bfec

View File

@ -1,5 +1,6 @@
import ast
import math
import os
import random
import re
@ -32,7 +33,7 @@ def checkExoSupportCompatibility(obj):
def get_module_from_string(value: str, *args, **kwargs):
locs = {}
try:
exec(value, {"random": random, "string": string, "sympy": sympy}, locs)
exec(value, {"random": random, "string": string, "sympy": sympy, "math": math}, locs)
except Exception as err:
raise ValueError(err.args[0])
return locs