Only attach arguments to unnamed operations.
This stops showing the arguments when we already have a name (that should
do the explanation w/o arguments).
@@ -187,6 +187,8 @@ def operation(func=None, pipeline_facts=None):
# Name the operation
name = op_meta_kwargs.get('name')
+ add_args = False
+
if name:
names = {name}
@@ -200,6 +202,7 @@ def operation(func=None, pipeline_facts=None):
# Generate an operation name if needed (Module/Operation format)
else:
+ add_args = True
module_bits = func.__module__.split('.')
module_name = module_bits[-1]
names = {
@@ -276,6 +279,7 @@ def operation(func=None, pipeline_facts=None):
op_meta['names'].update(names)
# Attach normal args, if we're auto-naming this operation
+ if add_args:
for arg in args:
if isinstance(arg, FunctionType):
arg = arg.__name__
