From ff540429f358e8619e8718519181574327d41a1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:26:36 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1) - [github.com/fsfe/reuse-tool: v4.0.3 → v5.0.2](https://github.com/fsfe/reuse-tool/compare/v4.0.3...v5.0.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfc59449..72e79195 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: # Run ruff to lint and format - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.7.2 + rev: v0.8.1 hooks: # Run the linter. - id: ruff @@ -49,6 +49,6 @@ repos: # Reuse compliance - repo: https://github.com/fsfe/reuse-tool - rev: v4.0.3 + rev: v5.0.2 hooks: - id: reuse From 1640230518822f9cf0130d3862cd010a235a9a05 Mon Sep 17 00:00:00 2001 From: lkstrp Date: Mon, 9 Dec 2024 12:01:09 +0100 Subject: [PATCH 2/2] fix ruff --- atlite/datasets/era5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atlite/datasets/era5.py b/atlite/datasets/era5.py index 04e88015..d1e5224f 100644 --- a/atlite/datasets/era5.py +++ b/atlite/datasets/era5.py @@ -306,7 +306,7 @@ def retrieval_times(coords, static=False, monthly_requests=False): "year": str(year), "month": str(month), "day": list(t[t.month == month].day.unique()), - "time": ["%02d:00" % h for h in t[t.month == month].hour.unique()], + "time": [f"{h:02d}:00" for h in t[t.month == month].hour.unique()], } times.append(query) else: @@ -314,7 +314,7 @@ def retrieval_times(coords, static=False, monthly_requests=False): "year": str(year), "month": list(t.month.unique()), "day": list(t.day.unique()), - "time": ["%02d:00" % h for h in t.hour.unique()], + "time": [f"{h:02d}:00" for h in t.hour.unique()], } times.append(query) return times