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 Apr 1, 2024
1 parent c94669c commit 6d1032b
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions aiida_firecrest/remote_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
in fact it is awaiting possible inclusion in pyfirecrest:
https://github.com/eth-cscs/pyfirecrest/pull/43
"""

from __future__ import annotations

from collections.abc import Iterator
Expand Down
1 change: 1 addition & 0 deletions aiida_firecrest/scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Scheduler interface."""

from __future__ import annotations

import re
Expand Down
5 changes: 4 additions & 1 deletion aiida_firecrest/transport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Transport interface."""

from __future__ import annotations

import fnmatch
Expand Down Expand Up @@ -26,7 +27,9 @@ class ValidAuthOption(TypedDict, total=False):
switch: bool # whether the option is a boolean flag
type: type[Any] | ParamType
default: Any
non_interactive_default: bool # whether option should provide a default in non-interactive mode
non_interactive_default: (
bool # whether option should provide a default in non-interactive mode
)
prompt: str # for interactive CLI
help: str
callback: Callable[..., Any] # for validation
Expand Down
8 changes: 5 additions & 3 deletions aiida_firecrest/utils_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities mainly for testing."""

from __future__ import annotations

from dataclasses import dataclass, field
Expand Down Expand Up @@ -241,9 +242,10 @@ def compute_jobs_path(self, data: dict[str, Any], response: Response) -> Respons
stderr=subprocess.STDOUT,
)
else:
with open(script_path.parent / out_file, "w") as out, open(
script_path.parent / error_file, "w"
) as err:
with (
open(script_path.parent / out_file, "w") as out,
open(script_path.parent / error_file, "w") as err,
):
subprocess.run(
[str(script_path)], cwd=script_path.parent, stdout=out, stderr=err
)
Expand Down
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pytest configuration that must be at the root level."""

pytest_plugins = ["aiida.manage.tests.pytest_fixtures"]


Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This sets up the Firecrest server to use, and telemetry for API requests.
"""

from __future__ import annotations

from functools import partial
Expand Down
1 change: 1 addition & 0 deletions tests/test_calculation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for running calculations on a FireCREST computer."""

from pathlib import Path

from aiida import common, engine, manage, orm
Expand Down
1 change: 1 addition & 0 deletions tests/test_computer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests for setting up an AiiDA computer for Firecrest,
and basic functionality of the Firecrest transport and scheduler plugins.
"""

from pathlib import Path

from aiida import orm
Expand Down
1 change: 1 addition & 0 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests isolating only the Scheduler."""

from aiida.schedulers import SchedulerError
from aiida.schedulers.datastructures import CodeRunMode, JobTemplate
import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_transport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests isolating only the Transport."""

from pathlib import Path
import platform

Expand Down

0 comments on commit 6d1032b

Please sign in to comment.