File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -866,12 +866,21 @@ def _process_function_parameter(self, symbol):
866866 else :
867867 new_children .append (self .process_symbol (child ))
868868
869- # Get the expression and inputs for the function
869+ # Get the expression and inputs for the function.
870+ # func_args may include arguments that were not explicitly wired up
871+ # in this FunctionParameter (e.g., kwargs with default values). After
872+ # serialisation/deserialisation, we only recover the children that were
873+ # actually connected.
874+ #
875+ # Using strict=True here therefore raises a ValueError when there are
876+ # more args than children. We allow func_args to be longer than
877+ # symbol.children and only build the mapping for the args for which we
878+ # actually have children.
870879 expression = function_parameter .child
871880 inputs = {
872881 arg : child
873882 for arg , child in zip (
874- function_parameter .func_args , symbol .children , strict = True
883+ function_parameter .func_args , symbol .children , strict = False
875884 )
876885 }
877886
You can’t perform that action at this time.
0 commit comments