Skip to content

Commit 251bedb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5b3f5d2 commit 251bedb

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

src/aiida/cmdline/commands/cmd_computer.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from aiida.cmdline.params import arguments, options
2121
from aiida.cmdline.params.options.commands import computer as options_computer
2222
from aiida.cmdline.utils import echo, echo_tabulate
23-
from aiida.cmdline.utils.common import validate_output_filename, tabulate
23+
from aiida.cmdline.utils.common import tabulate, validate_output_filename
2424
from aiida.cmdline.utils.decorators import with_dbenv
2525
from aiida.common.exceptions import EntryPointError, ValidationError
2626
from aiida.plugins.entry_point import get_entry_point_names
@@ -860,7 +860,7 @@ def computer_search(ctx, pattern, source):
860860
ComputerSelector,
861861
ComputerSetupHandler,
862862
ComputerSource,
863-
) # noqa: PLC0415
863+
)
864864

865865
# Convert string to enum
866866
source_enum = ComputerSource(source)
@@ -895,10 +895,13 @@ def computer_search(ctx, pattern, source):
895895
# Handle SSH-only source differently
896896
if source_enum == ComputerSource.SSH_CONFIG:
897897
# Show table of SSH config computers
898-
print(tabulate(
899-
[[i+1, k] for i, k in enumerate(registry_data.keys())],
900-
headers=['#', 'SSH Config Computer'],
901-
tablefmt='grid'))
898+
print(
899+
tabulate(
900+
[[i + 1, k] for i, k in enumerate(registry_data.keys())],
901+
headers=['#', 'SSH Config Computer'],
902+
tablefmt='grid',
903+
)
904+
)
902905
echo.echo_report('Computers registered in the ~/.ssh/config can be set up using the `core.ssh_async` transport')
903906
echo.echo_report('This transport plugin automatically uses your OS SSH configuration')
904907
echo.echo_report('for connection settings including ProxyJump, IdentityFile, and other SSH options.')
@@ -919,7 +922,9 @@ def computer_search(ctx, pattern, source):
919922
return
920923

921924
# Prompt user before setup
922-
if not click.confirm(f'Would you like to set up the computer "{system_name}" with variant "{variant}" now?', default=True):
925+
if not click.confirm(
926+
f'Would you like to set up the computer "{system_name}" with variant "{variant}" now?', default=True
927+
):
923928
print('Setup cancelled.')
924929
return
925930

src/aiida/cmdline/utils/registry_helpers.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
from dataclasses import dataclass
1212
from enum import Enum
1313
from pathlib import Path
14-
from aiida.cmdline.utils.common import tabulate
1514

1615
import click
1716
import requests
1817
import yaml
1918

19+
from aiida.cmdline.utils.common import tabulate
20+
2021
LOGGER = logging.getLogger(__name__)
2122

2223
__all__ = (
@@ -756,10 +757,14 @@ def handle_registry_setup(ctx, selector: 'ComputerSelector', system_name: str, v
756757
LOGGER.info(f'Setup YAML file written to: {setup_file}')
757758

758759
# Always write configuration YAML and log that auto-configuration is not supported
759-
LOGGER.warning('Automatic configuration of computers is not yet supported. Writing configuration YAML file to disk.')
760+
LOGGER.warning(
761+
'Automatic configuration of computers is not yet supported. Writing configuration YAML file to disk.'
762+
)
760763
configure_file = file_manager.save_config(processed_configure_config, 'configure', system_name, variant)
761764
LOGGER.info(f'Configuration YAML file written to: {configure_file}')
762-
ComputerSetupHandler._auto_configure(ctx, processed_configure_config, computer_label, transport_type, configure_file)
765+
ComputerSetupHandler._auto_configure(
766+
ctx, processed_configure_config, computer_label, transport_type, configure_file
767+
)
763768

764769
return True
765770

0 commit comments

Comments
 (0)