Commit 1c0a1f8e authored by lintangsutawika's avatar lintangsutawika
Browse files

condition if kwargs is None

parent 1e0d27ba
...@@ -21,11 +21,14 @@ def build_filter_ensemble(filter_name, components): ...@@ -21,11 +21,14 @@ def build_filter_ensemble(filter_name, components):
""" """
Create a filtering pipeline. Create a filtering pipeline.
""" """
filters = [] filters = []
for (function, kwargs) in components: for (function, kwargs) in components:
# create a filter given its name in the registry if kwargs == None:
f = get_filter(function)(**kwargs) # TODO: pass kwargs to filters properly f = get_filter(function)()
else:
# create a filter given its name in the registry
f = get_filter(function)(**kwargs) # TODO: pass kwargs to filters properly
# add the filter as a pipeline step # add the filter as a pipeline step
filters.append(f) filters.append(f)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment