You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run pyt on code like x = f(g(a)(b)), it will raise an Exception
File "/pack/pyt/pyt/cfg/stmt_visitor.py", line 83, in stmt_star_handler
node = self.visit(stmt)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File "/pack/pyt/pyt/cfg/stmt_visitor.py", line 452, in visit_Assign
return self.assignment_call_node(label.result, node)
File "/pack/pyt/pyt/cfg/stmt_visitor.py", line 485, in assignment_call_node
vars_visitor.visit(ast_node.value)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File "/pack/pyt/pyt/helper_visitors/vars_visitor.py", line 106, in visit_Call
raise
So this is difficult, we probably wouldn't generate a "proper" CFG for curried code, (the calling what is returned part). For now we can make it [ret_g, b, c] which means false-positives but definitely acceptable given how rare code like this is.
If you run pyt on code like
x = f(g(a)(b))
, it will raise an ExceptionTest case:
What should the result be?
['a', 'b', 'c']
? I'm not exactly sure what the function on VarsVisitor is.The text was updated successfully, but these errors were encountered: