Skip to content

Commit 42ee3fc

Browse files
chore(deps): pre-commit.ci autoupdate (#269)
updates: - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](psf/black-pre-commit-mirror@25.12.0...26.1.0) - [github.com/astral-sh/ruff-pre-commit: v0.14.10 → v0.14.14](astral-sh/ruff-pre-commit@v0.14.10...v0.14.14) - [github.com/tox-dev/pyproject-fmt: v2.11.1 → v2.12.1](tox-dev/pyproject-fmt@v2.11.1...v2.12.1) - [github.com/jshwi/docsig: v0.74.0 → v0.77.0](jshwi/docsig@v0.74.0...v0.77.0)
1 parent fd643e5 commit 42ee3fc

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- id: python-check-blanket-noqa # Check for # noqa: all
2828
- id: python-no-log-warn # Check for log.warn
2929
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 25.12.0
30+
rev: 26.1.0
3131
hooks:
3232
- id: black
3333
args: [--line-length=120]
@@ -41,7 +41,7 @@ repos:
4141
- --profile black
4242
- --project anemoi
4343
- repo: https://github.com/astral-sh/ruff-pre-commit
44-
rev: v0.14.10
44+
rev: v0.14.14
4545
hooks:
4646
- id: ruff
4747
args:
@@ -59,12 +59,12 @@ repos:
5959
- id: docconvert
6060
args: ["numpy"]
6161
- repo: https://github.com/tox-dev/pyproject-fmt
62-
rev: "v2.11.1"
62+
rev: "v2.12.1"
6363
hooks:
6464
- id: pyproject-fmt
6565
args: ["--max-supported-python", "3.12"]
6666
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
67-
rev: v0.74.0
67+
rev: v0.77.0
6868
hooks:
6969
- id: docsig
7070
args:

src/anemoi/utils/provenance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def assets_info(paths: list[str]) -> dict[str, Any]:
415415

416416
for path in paths:
417417
try:
418-
(mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(path) # noqa: F841
418+
mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime = os.stat(path) # noqa: F841
419419
md5 = path_md5(path)
420420
except Exception as e:
421421
result[path] = str(e)

tests/test_dates.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,35 @@ def _(txt: str) -> datetimes_factory:
3636

3737
def test_date_1() -> None:
3838
"""Test datetimes_factory with a list of dates."""
39-
d = _(
40-
"""
39+
d = _("""
4140
- 2023-01-01
4241
- 2023-01-02
4342
- 2023-01-03
44-
"""
45-
)
43+
""")
4644
assert len(list(d)) == 3
4745

4846

4947
def test_date_2() -> None:
5048
"""Test datetimes_factory with a date range and frequency."""
51-
d = _(
52-
"""
49+
d = _("""
5350
start: 2023-01-01
5451
end: 2023-01-07
5552
frequency: 12
5653
day_of_week: [monday, friday]
57-
"""
58-
)
54+
""")
5955
assert len(list(d)) == 4
6056

6157

6258
def test_date_3() -> None:
6359
"""Test datetimes_factory with multiple date ranges and frequencies."""
64-
d = _(
65-
"""
60+
d = _("""
6661
- start: 2023-01-01
6762
end: 2023-01-03
6863
frequency: 24
6964
- start: 2024-01-01T06:00:00
7065
end: 2024-01-02T18:00:00
7166
frequency: 6h
72-
"""
73-
)
67+
""")
7468
assert datetime.datetime(2023, 1, 1, 0) in d
7569
assert datetime.datetime(2023, 1, 2, 0) in d
7670
assert datetime.datetime(2023, 1, 3, 0) in d
@@ -86,16 +80,14 @@ def test_date_3() -> None:
8680

8781
def test_date_hindcast_1() -> None:
8882
"""Test datetimes_factory with hindcast configuration."""
89-
d = _(
90-
"""
83+
d = _("""
9184
- name: hindcast
9285
reference_dates:
9386
start: 2023-01-01
9487
end: 2023-01-03
9588
frequency: 24
9689
years: 20
97-
"""
98-
)
90+
""")
9991
assert len(list(d)) == 60
10092

10193

0 commit comments

Comments
 (0)