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 May 24, 2024
1 parent 55308fc commit 97a3e42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/aiida/cmdline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# fmt: off
import logging

CMDLINE_LOGGER = logging.getLogger('verdi')

from .groups import *
Expand Down
14 changes: 9 additions & 5 deletions src/aiida/cmdline/commands/cmd_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
###########################################################################
"""`verdi computer` command."""

import traceback
from copy import deepcopy
from functools import partial
from math import isclose

import click

import traceback

from aiida.cmdline import CMDLINE_LOGGER
from aiida.cmdline.commands.cmd_verdi import VerdiCommandGroup, verdi
from aiida.cmdline.params import arguments, options
from aiida.cmdline.params.options.commands import computer as options_computer
from aiida.cmdline import CMDLINE_LOGGER
from aiida.cmdline.utils import echo, echo_tabulate
from aiida.cmdline.utils.decorators import with_dbenv
from aiida.common.exceptions import EntryPointError, ValidationError
Expand Down Expand Up @@ -770,7 +769,9 @@ def computer_export_setup(computer, output_file):
except Exception as e:
error_traceback = traceback.format_exc()
CMDLINE_LOGGER.debug(error_traceback)
echo.echo_critical(f'Unexpected error while exporting setup for Computer<{computer.pk}> {computer.label}:\n ({e!s}).')
echo.echo_critical(
f'Unexpected error while exporting setup for Computer<{computer.pk}> {computer.label}:\n ({e!s}).'
)


@computer_export.command('config')
Expand All @@ -783,6 +784,7 @@ def computer_export_setup(computer, output_file):
def computer_export_config(computer, user, output_file):
"""Export the configuration of the authentication info for a computer and user to a yaml file."""
import yaml

from aiida.orm import User

if not computer.is_configured:
Expand All @@ -803,4 +805,6 @@ def computer_export_config(computer, user, output_file):
except Exception as e:
error_traceback = traceback.format_exc()
CMDLINE_LOGGER.debug(error_traceback)
echo.echo_critical(f'Unexpected error while exporting configuration for Computer<{computer.pk}> {computer.label} and User<{user.pk}> {user.email}: {e!s}.')
echo.echo_critical(
f'Unexpected error while exporting configuration for Computer<{computer.pk}> {computer.label} and User<{user.pk}> {user.email}: {e!s}.'
)
1 change: 0 additions & 1 deletion src/aiida/cmdline/utils/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import collections
import enum
import json
import logging
import sys
from typing import Any, Optional

Expand Down

0 comments on commit 97a3e42

Please sign in to comment.