Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 27, 2024
1 parent 1e9fcdf commit 3cb8539
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/aiida/cmdline/commands/cmd_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ def process_kill(processes, all_entries, timeout, wait, force_kill):
with capture_logging() as stream:
try:
message = 'Killed through `verdi process kill`'
control.kill_processes(processes, all_entries=all_entries, timeout=timeout, wait=wait, message=message, force_kill=force_kill)
control.kill_processes(
processes, all_entries=all_entries, timeout=timeout, wait=wait, message=message, force_kill=force_kill
)
except control.ProcessTimeoutException as exception:
echo.echo_critical(f'{exception}\n{REPAIR_INSTRUCTIONS}')

Expand Down
8 changes: 7 additions & 1 deletion src/aiida/cmdline/params/options/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@ def set_log_level(ctx, _param, value):

FORCE = OverridableOption('-f', '--force', is_flag=True, default=False, help='Do not ask for confirmation.')

FORCE_KILL = OverridableOption('-fk', '--force-kill', is_flag=True, default=False, help='Kills the process without waiting for a response if the job is killed.')
FORCE_KILL = OverridableOption(
'-fk',
'--force-kill',
is_flag=True,
default=False,
help='Kills the process without waiting for a response if the job is killed.',
)

SILENT = OverridableOption('-s', '--silent', is_flag=True, default=False, help='Suppress any output printed to stdout.')

Expand Down
4 changes: 3 additions & 1 deletion src/aiida/engine/processes/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def kill_processes(
return

controller = get_manager().get_process_controller()
_perform_actions(processes, controller.kill_process, 'kill', 'killing', timeout, wait, msg=message, force_kill=force_kill)
_perform_actions(
processes, controller.kill_process, 'kill', 'killing', timeout, wait, msg=message, force_kill=force_kill
)


def _perform_actions(
Expand Down

0 comments on commit 3cb8539

Please sign in to comment.