Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Jun 24, 2024
1 parent a00bbf1 commit fd422ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/arcaflow_plugin_sdk/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5991,14 +5991,15 @@ def __call__(
result = self._handler(step_local_data.initialized_object, params)
if not isinstance(result, tuple):
raise BadArgumentException(
"The step returned type {};".format(type(result))
+ " expected a tuple with two values: output ID string"
" and a step-specific value."
f"The implementation of step {run_id}/{self.id} returned"
f" type {type(result)}; expected a tuple with two"
" values: output ID string and a step-specific value."
)
if len(result) != 2:
raise BadArgumentException(
"The step returned {} results instead of 2. Did your step"
" return the correct results?".format(len(result))
f"The implementation of step {run_id}/{self.id} returned"
f"{len(result)} results instead of 2. Did your step"
" return the correct results?"
)
output_id, output_data = result
if output_id not in self.outputs:
Expand Down
2 changes: 1 addition & 1 deletion src/arcaflow_plugin_sdk/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def cleanup():
@plugin.step(
"incorrect-return",
"Incorrect Return",
"A test that doesn't include the output ID.",
"A step that returns a bad output which omits the output ID.",
{"success": EmptyTestOutput},
)
def incorrect_return_step(
Expand Down

0 comments on commit fd422ae

Please sign in to comment.