Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #27

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ ci:
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py39-plus]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.275
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.10.1
hooks:
- id: mypy
files: ^(aiida_firecrest/.*py)$
Expand Down
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
Loading