diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e71f518..1e8332a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: black args: [--line-length=120] - repo: https://github.com/pycqa/isort - rev: 9.0.0a3 + rev: 9.0.0b1 hooks: - id: isort args: @@ -41,7 +41,7 @@ repos: - --profile black - --project anemoi - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.15 + rev: v0.16.1 hooks: - id: ruff args: @@ -71,12 +71,12 @@ repos: - --license - tools/pre-commit-copyright-notice.txt - repo: https://github.com/tox-dev/pyproject-fmt - rev: "v2.23.0" + rev: "v2.26.0" hooks: - id: pyproject-fmt args: ["--max-supported-python", "3.12"] - repo: https://github.com/jshwi/docsig # Check docstrings against function sig - rev: v0.86.0 + rev: v0.93.0 hooks: - id: docsig args: diff --git a/tests/system-level/anemoi_test/nodes.py b/tests/system-level/anemoi_test/nodes.py index 99061d3..bc864de 100644 --- a/tests/system-level/anemoi_test/nodes.py +++ b/tests/system-level/anemoi_test/nodes.py @@ -9,7 +9,6 @@ import os from pathlib import Path -from typing import Optional import pyflow as pf import wellies as wl @@ -107,7 +106,7 @@ def __init__(self, config, **kwargs): class TrainingTask(pf.Task): def __init__(self, folder: str, suite_config: dict, training_cmd: str = "anemoi-training train"): - self.required_datasets: Optional[str] = None + self.required_datasets: str | None = None overrides = { "--config-path": STATIC_DATA_DIR / "training" / folder, @@ -218,7 +217,7 @@ def __init__( config_template_path: Path, output_path: Path, ): - self.required_trainings: Optional[str] = None + self.required_trainings: str | None = None script = pf.FileScript(SUITE_DIR / "configs/inference" / folder / "generate_config.sh") script.environment_variable("CHECKPOINT_DIR", str(checkpoint_path)) script.environment_variable("CHECKPOINT_FILE", checkpoint_file) @@ -232,7 +231,7 @@ class InferenceRetrieveTask(pf.Task): def __init__( self, folder: str, suite_config: dict, config_path: Path, mars_cmd: str, retrieve_cmd: str, output_path: Path ): - self.required_trainings: Optional[str] = None + self.required_trainings: str | None = None script = pf.FileScript(SUITE_DIR / "configs/inference/" / folder / "retrieve.sh") script.environment_variable("CONFIG_PATH", str(config_path)) script.environment_variable("MARS_CMD", mars_cmd) @@ -243,7 +242,7 @@ def __init__( class InferenceTask(pf.Task): def __init__(self, folder: str, suite_config: dict, config_path: Path, inference_cmd: str, output_path: Path): - self.required_trainings: Optional[str] = None + self.required_trainings: str | None = None script = pf.FileScript(SUITE_DIR / "configs/inference/inference.sh") script.environment_variable("CONFIG_PATH", str(config_path)) script.environment_variable("INFERENCE_CMD", inference_cmd)