Skip to content

Commit

Permalink
Apply Ruff format
Browse files Browse the repository at this point in the history
Signed-off-by: Chin Yeung Li <[email protected]>
  • Loading branch information
chinyeungli committed Aug 13, 2024
1 parent d1a834f commit d9bb42d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aboutcode/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def get_steps(cls, groups=None):
if ``groups`` is not specified, include the step in the result.
"""
if not callable(cls.steps):
raise TypeError(
"Use a ``steps(cls)`` classmethod to declare the steps.")
raise TypeError("Use a ``steps(cls)`` classmethod to declare the steps.")

steps = cls.steps()

Expand Down Expand Up @@ -172,8 +171,7 @@ def output_from_exception(exception):
if exception.__cause__ and str(exception.__cause__) != str(exception):
output += f"Cause: {exception.__cause__}\n\n"

traceback_formatted = "".join(
traceback.format_tb(exception.__traceback__))
traceback_formatted = "".join(traceback.format_tb(exception.__traceback__))
output += f"Traceback:\n{traceback_formatted}"

return output
Expand Down Expand Up @@ -204,8 +202,7 @@ def execute(self):
return 1, self.output_from_exception(exception)

step_run_time = timer() - step_start_time
self.log(
f"Step [{step_name}] completed in {humanize_time(step_run_time)}")
self.log(f"Step [{step_name}] completed in {humanize_time(step_run_time)}")

# Reset the `current_step` field on completion
self.set_current_step("")
Expand Down

0 comments on commit d9bb42d

Please sign in to comment.