File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2121use for error reporting.
2222"""
2323# pylint: disable=invalid-name, inconsistent-return-statements, no-else-return
24+ import types
2425import json
2526import operator
2627import inspect
@@ -580,10 +581,14 @@ def transform_Assign(self, node):
580581 arg_list = self .parse_arg_list (func , node .rhs )
581582 func .handle (node , self .context , arg_list , node .rhs .func_name .span )
582583 return self .parse_body (node )
583- elif callable (func ):
584+ elif isinstance (func , types . FunctionType ):
584585 # Pattern 5
585586 args = [self .transform (arg ) for arg in node .rhs .params ]
586587 out = func (* args )
588+
589+ if len (node .lhs ) == 1 and not isinstance (out , list ):
590+ out = [out ]
591+
587592 assert len (out ) == len (node .lhs )
588593
589594 for var , value in zip (node .lhs , out ):
You can’t perform that action at this time.
0 commit comments