File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1515import threading
1616
1717import celpy
18+ import celpy .celtypes
1819
1920_has_state = threading .local ()
2021
@@ -32,14 +33,14 @@ def in_has() -> bool:
3233
3334
3435class InterpretedRunner (celpy .InterpretedRunner ):
35- def evaluate (self , context ):
36+ def evaluate (self , context ) -> celpy . celtypes . Value :
3637 class Evaluator (celpy .Evaluator ):
37- def macro_has_eval (self , exprlist ):
38+ def macro_has_eval (self , exprlist ) -> celpy . celtypes . BoolType :
3839 _has_state .in_has = True
3940 result = super ().macro_has_eval (exprlist )
4041 _has_state .in_has = False
4142 return result
4243
43- e = Evaluator (ast = self .ast , activation = self .new_activation (context ), functions = self . functions )
44- value = e .evaluate ()
44+ e = Evaluator (ast = self .ast , activation = self .new_activation () )
45+ value = e .evaluate (context )
4546 return value
You can’t perform that action at this time.
0 commit comments