Skip to content

Commit

Permalink
Use __call__ instead of run method
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzzyxdonta committed Oct 12, 2023
1 parent 9403e9a commit 6332716
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hermes/commands/deposit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, click_ctx: click.Context, ctx: CodeMetaContext) -> None:
self.click_ctx = click_ctx
self.ctx = ctx

def run(self) -> None:
def __call__(self) -> None:
# TODO: Decide here which of initial/new/... to run?
steps = [
"prepare",
Expand Down
2 changes: 1 addition & 1 deletion src/hermes/commands/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def deposit(click_ctx: click.Context, initial, auth_token, file):
deposit_plugin = deposit_plugin_class(click_ctx, ctx)

try:
deposit_plugin.run()
deposit_plugin()
except (RuntimeError, MisconfigurationError) as e:
_log.error(f"Error in {group!r} entry point {plugin!r}: {e}")
click_ctx.exit(1)
Expand Down

0 comments on commit 6332716

Please sign in to comment.