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 Nov 22, 2024
1 parent 6ec11a4 commit 88fe04d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/aiida/manage/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from __future__ import annotations


# AUTO-GENERATED
# fmt: off
from .migrations import *
Expand Down Expand Up @@ -67,9 +66,10 @@

def get_config_path():
"""Returns path to aiida configuration file."""
from .settings import DEFAULT_CONFIG_FILE_NAME
from aiida.manage.configuration.settings import AiiDAConfigDir

from .settings import DEFAULT_CONFIG_FILE_NAME

return os.path.join(AiiDAConfigDir.get_configuration_directory(), DEFAULT_CONFIG_FILE_NAME)


Expand Down
3 changes: 1 addition & 2 deletions src/aiida/manage/configuration/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import io
import json
import os
from pathlib import Path
import uuid
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple

from pydantic import (
Expand Down Expand Up @@ -782,7 +782,6 @@ def _atomic_write(self, filepath=None):
handle.flush()
os.rename(handle.name, self.filepath)


def filepaths(self, profile: Profile):
"""Return the filepaths used by this profile.
Expand Down
4 changes: 1 addition & 3 deletions src/aiida/manage/configuration/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ class Profile:
KEY_PROCESS,
)

def __init__(
self, name: str, config: abc.Mapping[str, Any], validate: bool = True
):
def __init__(self, name: str, config: abc.Mapping[str, Any], validate: bool = True):
"""Load a profile with the profile configuration."""
type_check(config, abc.Mapping)
if validate and not set(config.keys()).issuperset(self.REQUIRED_KEYS):
Expand Down

0 comments on commit 88fe04d

Please sign in to comment.