Skip to content

Commit 0ad9cd1

Browse files
committed
Remove validation of function arguments, as this is not compatible with kwargs + fixes
1 parent fc74805 commit 0ad9cd1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dataikuapi/dss/recipe.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,17 +1029,11 @@ def with_function_name(self, module_name, function_name, function_args=None, cus
10291029
return self
10301030

10311031
def with_function(self, fn, function_args=None, custom_template=None):
1032+
import inspect
10321033
#TODO: add in documentation that relative imports wont work
10331034
module_name = inspect.getmodule(fn).__name__
10341035
fname = fn.__name__
1035-
1036-
# Validate that function_args apply to fn
1037-
argspec = inspect.getargspec(fn)
1038-
for k in function_args.keys():
1039-
if k not in argspec.args:
1040-
raise ValueError("Provided key argument {} not an argument of function {}".format(k, fname))
1041-
1042-
return with_function_name(module_name, fname, function_args, custom_template)
1036+
return self.with_function_name(module_name, fname, function_args, custom_template)
10431037

10441038
class SQLQueryRecipeCreator(SingleOutputRecipeCreator):
10451039
"""

0 commit comments

Comments
 (0)