import math to make it usable
This commit is contained in:
parent
9cce9e6d67
commit
339f18bfec
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import ast
|
import ast
|
||||||
|
import math
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
@ -32,7 +33,7 @@ def checkExoSupportCompatibility(obj):
|
|||||||
def get_module_from_string(value: str, *args, **kwargs):
|
def get_module_from_string(value: str, *args, **kwargs):
|
||||||
locs = {}
|
locs = {}
|
||||||
try:
|
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:
|
except Exception as err:
|
||||||
raise ValueError(err.args[0])
|
raise ValueError(err.args[0])
|
||||||
return locs
|
return locs
|
||||||
|
Loading…
Reference in New Issue
Block a user