From e2d3b9278aa8e2ff8638faaa32a6880e1b5d2dfc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 23:07:32 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiida/cmdline/commands/cmd_calcjob.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/aiida/cmdline/commands/cmd_calcjob.py b/aiida/cmdline/commands/cmd_calcjob.py index 3b1d708b58..f2c6b7e581 100644 --- a/aiida/cmdline/commands/cmd_calcjob.py +++ b/aiida/cmdline/commands/cmd_calcjob.py @@ -305,6 +305,7 @@ def calcjob_cleanworkdir(calcjobs, past_days, older_than, computers, force, exit echo.echo_success(f'{counter} remote folders cleaned on {computer.label}') + @verdi_calcjob.command('caching') @decorators.with_dbenv() @arguments.CALCULATIONS('calcjobs', type=CalculationParamType(sub_classes=('aiida.node:process.calculation.calcjob',))) @@ -325,13 +326,14 @@ def calcjob_cleanworkdir(calcjobs, past_days, older_than, computers, force, exit modified AFTER [-p option] days from now, but BEFORE [-o option] days from now. """ from aiida import orm + #from aiida.orm.utils.remote import get_calcjob_remote_paths if enable and disable: - raise click.UsageError("Cannot enable and disable caching simultaneously.") + raise click.UsageError('Cannot enable and disable caching simultaneously.') if not enable and not disable and not status: - raise click.UsageError("Please specify either --enable or --disable or --status.") + raise click.UsageError('Please specify either --enable or --disable or --status.') if calcjobs: if (past_days is not None and older_than is not None): @@ -357,11 +359,11 @@ def calcjob_cleanworkdir(calcjobs, past_days, older_than, computers, force, exit # get the caching flag if enable: - action = "enable" + action = 'enable' caching_flag = True - + if disable: - action = "disable" + action = 'disable' caching_flag = False if not force: