Skip to content

Commit ac1d02d

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

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

src/aiida/cmdline/commands/cmd_computer.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,11 @@
2626
from aiida.plugins.entry_point import get_entry_point_names
2727

2828
from .registry_helpers import (
29-
apply_computer_config,
30-
fetch_resource_registry_data,
31-
fetch_code_registry_data,
32-
get_computer_configure_config,
33-
get_computer_setup_config,
34-
interactive_computer_selector,
35-
interactive_system_selector,
36-
save_config_to_file,
37-
search_computers_in_aiida,
3829
_get_computers_table,
3930
_handle_computer_configuration,
40-
_process_template_variables,
41-
_replace_template_var,
31+
fetch_code_registry_data,
32+
fetch_resource_registry_data,
33+
interactive_system_selector,
4234
)
4335

4436

@@ -899,9 +891,10 @@ def computer_search(pattern, save_only):
899891

900892
# Offer to setup a computer
901893
if click.confirm('\nWould you like to setup a computer from the registry?'):
902-
903894
if len(table) == 1:
904-
import ipdb; ipdb.set_trace()
895+
import ipdb
896+
897+
ipdb.set_trace()
905898
# Only one match, use it directly
906899
computer_name = matching_systems[0]
907900
# NOTE: Add here interactive variant selection

src/aiida/cmdline/commands/registry_helpers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Helper functions for AiiDA code registry integration."""
22

33
import json
4-
import tempfile
54
import typing as t
65
from pathlib import Path
76

@@ -10,13 +9,13 @@
109
import yaml
1110

1211
from aiida.cmdline.utils import echo
13-
from aiida.common.exceptions import EntryPointError, ValidationError
12+
from aiida.common.exceptions import ValidationError
1413

1514
# Direct URL to the database.json file
1615

1716
__all__ = (
18-
'_handle_computer_configuration',
1917
'_get_computers_table',
18+
'_handle_computer_configuration',
2019
'_process_template_variables',
2120
'_replace_template_var',
2221
'apply_computer_config',
@@ -417,7 +416,6 @@ def complete_computer_spec_with_defaults(setup_config: t.Dict[str, t.Any]) -> t.
417416

418417
def apply_computer_config(setup_config: t.Dict[str, t.Any], configure_config: t.Dict[str, t.Any]) -> bool:
419418
"""Apply computer configuration directly to AiiDA."""
420-
from aiida.orm import Computer
421419
from aiida.orm.utils.builders.computer import ComputerBuilder
422420

423421
try:

0 commit comments

Comments
 (0)