From 657da85978f1e50a894c6b5a3f60797a958ddfe5 Mon Sep 17 00:00:00 2001 From: Kameron Carr Date: Thu, 17 Oct 2024 11:17:26 -0700 Subject: [PATCH] Script Transformer: Enable Compound Types This will allow for the use of list, tuple, set, dict in the scripts of the script transformer. --- lisa/transformers/script_transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisa/transformers/script_transformer.py b/lisa/transformers/script_transformer.py index 18814af2c4..6d91f3ec2b 100644 --- a/lisa/transformers/script_transformer.py +++ b/lisa/transformers/script_transformer.py @@ -61,7 +61,7 @@ def _internal_run(self) -> Dict[str, Any]: key: self._runbook_builder.variables[key].data for key in item.variables } - evaluator = simpleeval.SimpleEval( + evaluator = simpleeval.EvalWithCompoundTypes( # Update ex: DEFAULT_OPERATORS | {ast.BitXor, operator.xor} operators=simpleeval.DEFAULT_OPERATORS | {}, # Update ex: DEFAULT_FUNCTIONS | {'floor': math.floor}