Skip to content

Commit

Permalink
Resolve undefined variables in Evaluator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
emileferreira committed Jan 18, 2024
1 parent f51c92c commit a083e90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RASP_support/Evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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:",
Expand Down

0 comments on commit a083e90

Please sign in to comment.