From 244a3210333e6c6b9db681128f57efca6f857482 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 17:46:35 +0000 Subject: [PATCH 1/2] chore(deps): pre-commit.ci autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0) - [github.com/astral-sh/ruff-pre-commit: v0.14.10 → v0.14.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.10...v0.14.14) - [github.com/tox-dev/pyproject-fmt: v2.11.1 → v2.12.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.11.1...v2.12.1) - [github.com/jshwi/docsig: v0.74.0 → v0.77.0](https://github.com/jshwi/docsig/compare/v0.74.0...v0.77.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef4e368..2a3fa89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - id: python-check-blanket-noqa # Check for # noqa: all - id: python-no-log-warn # Check for log.warn - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black args: [--line-length=120] @@ -41,7 +41,7 @@ repos: - --profile black - --project anemoi - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.14.14 hooks: - id: ruff args: @@ -59,12 +59,12 @@ repos: - id: docconvert args: ["numpy"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "v2.11.1" + rev: "v2.12.1" hooks: - id: pyproject-fmt args: ["--max-supported-python", "3.12"] - repo: https://github.com/jshwi/docsig # Check docstrings against function sig - rev: v0.74.0 + rev: v0.77.0 hooks: - id: docsig args: From dbb18648e64623be7badf4463feb7faad8406bd8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 17:49:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/anemoi/utils/provenance.py | 2 +- tests/test_dates.py | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/anemoi/utils/provenance.py b/src/anemoi/utils/provenance.py index 9fcc0a7..5552cef 100644 --- a/src/anemoi/utils/provenance.py +++ b/src/anemoi/utils/provenance.py @@ -415,7 +415,7 @@ def assets_info(paths: list[str]) -> dict[str, Any]: for path in paths: try: - (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(path) # noqa: F841 + mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime = os.stat(path) # noqa: F841 md5 = path_md5(path) except Exception as e: result[path] = str(e) diff --git a/tests/test_dates.py b/tests/test_dates.py index 26eb970..6d428d5 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -36,41 +36,35 @@ def _(txt: str) -> datetimes_factory: def test_date_1() -> None: """Test datetimes_factory with a list of dates.""" - d = _( - """ + d = _(""" - 2023-01-01 - 2023-01-02 - 2023-01-03 - """ - ) + """) assert len(list(d)) == 3 def test_date_2() -> None: """Test datetimes_factory with a date range and frequency.""" - d = _( - """ + d = _(""" start: 2023-01-01 end: 2023-01-07 frequency: 12 day_of_week: [monday, friday] - """ - ) + """) assert len(list(d)) == 4 def test_date_3() -> None: """Test datetimes_factory with multiple date ranges and frequencies.""" - d = _( - """ + d = _(""" - start: 2023-01-01 end: 2023-01-03 frequency: 24 - start: 2024-01-01T06:00:00 end: 2024-01-02T18:00:00 frequency: 6h - """ - ) + """) assert datetime.datetime(2023, 1, 1, 0) in d assert datetime.datetime(2023, 1, 2, 0) in d assert datetime.datetime(2023, 1, 3, 0) in d @@ -86,16 +80,14 @@ def test_date_3() -> None: def test_date_hindcast_1() -> None: """Test datetimes_factory with hindcast configuration.""" - d = _( - """ + d = _(""" - name: hindcast reference_dates: start: 2023-01-01 end: 2023-01-03 frequency: 24 years: 20 - """ - ) + """) assert len(list(d)) == 60