From 66383242b20f9787f154124fb045aa1ad5b48e5f Mon Sep 17 00:00:00 2001 From: Emile Ferreira <32413750+emileferreira@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:50:31 +0200 Subject: [PATCH] Resolve undefined variables in Evaluator.py (#15) fixes typos - called variables with wrong names --- RASP_support/Evaluator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RASP_support/Evaluator.py b/RASP_support/Evaluator.py index ea5cd2f..0f20bd1 100644 --- a/RASP_support/Evaluator.py +++ b/RASP_support/Evaluator.py @@ -224,7 +224,7 @@ def _evaluateDictComp(self, ast): if not (isinstance(d, list) or isinstance(d, dict)): raise RASPTypeError( "dict comprehension should have got a list or dict to loop " - + "over, but got:", l) + + "over, but got:", d) res = {} iterator_names = self._names_list(ast.iterator) for vals in d: @@ -500,7 +500,7 @@ def _evaluateAggregateExpr(self, ast): default = self.evaluateExpr(ast.default) if ast.default else None if not isinstance(sel, UnfinishedSelect): - raise RASPTypeError("Expected selector, got:", strdesc(selector)) + raise RASPTypeError("Expected selector, got:", strdesc(sel)) if not isinstance(seq, UnfinishedSequence): raise RASPTypeError("Expected sequence, got:", strdesc(seq)) if isinstance(default, Unfinished): @@ -552,7 +552,7 @@ def _evaluateApplication(self, ast, unf): if not isinstance(unf, Unfinished): raise RASPTypeError("Applying unfinished expects to apply", ENCODER_NAME, "or selector, got:", - strdesc(sel)) + strdesc(unf)) if not isinstance(input_val, Iterable): raise RASPTypeError( "Applying unfinished expects iterable input, got:",