From 226fab081b5af630b0627f26e480e7265261739c Mon Sep 17 00:00:00 2001 From: Andreas Wicenec Date: Wed, 30 Mar 2022 17:52:21 +0800 Subject: [PATCH] added counting of kwonlyargs --- daliuge-engine/dlg/apps/pyfunc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daliuge-engine/dlg/apps/pyfunc.py b/daliuge-engine/dlg/apps/pyfunc.py index 3271c3e4a..ec4f10ee4 100644 --- a/daliuge-engine/dlg/apps/pyfunc.py +++ b/daliuge-engine/dlg/apps/pyfunc.py @@ -383,7 +383,8 @@ def run(self): if ('inputs' in self.parameters and isinstance(self.parameters['inputs'][0], dict)): logger.debug(f"Using named ports to identify inputs: "+\ f"{self.parameters['inputs']}") - for i in range(min(len(inputs),self.fn_nargs)): + for i in range(min(len(inputs),self.fn_nargs +\ + len(self.arguments.kwonlyargs))): # key for final dict is value in named ports dict key = list(self.parameters['inputs'][i].values())[0] # value for final dict is value in inputs dict