Skip to content

Commit

Permalink
chore: Refactor joining methods list in _set_parameter_or_attribute f…
Browse files Browse the repository at this point in the history
…unction.
  • Loading branch information
ogabrielluiz committed Aug 20, 2024
1 parent e1dafdb commit 2a7e639
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,10 @@ def _add_edge(self, component, key, output, _input):

def _set_parameter_or_attribute(self, key, value):
if isinstance(value, Component):
methods = [f"'{output.method}'" for output in value.outputs]
methods = ", ".join([f"'{output.method}'" for output in value.outputs])
raise ValueError(
f"You set {value.display_name} as value for `{key}`. "
"You should pass one of the following: "
f"{', '.join(methods)}"
f"You should pass one of the following: {methods}"
)
self._set_input_value(key, value)
self._parameters[key] = value
Expand Down

0 comments on commit 2a7e639

Please sign in to comment.