From d7801904581d1ade45098acfe12deec1dcf288f7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:57:37 +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.11.13 → v0.12.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.13...v0.12.0) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.16.0...v1.16.1) --- .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 161c6d0..c5632de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_stages: [pre-commit, manual] repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.13 + rev: v0.12.0 hooks: - id: ruff args: [ @@ -14,7 +14,7 @@ repos: - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.0 + rev: v1.16.1 hooks: - id: mypy additional_dependencies: [types-beautifulsoup4,types-requests] From ced912dfd0f3176ab526dbf27fa23270f6547977 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:57:52 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/disk_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/disk_utils.py b/src/disk_utils.py index 68bdeb0..943f5f7 100644 --- a/src/disk_utils.py +++ b/src/disk_utils.py @@ -7,12 +7,12 @@ T = TypeVar("T", dict, list) -def save_json(data: T, fname: str) -> None: +def save_json[T: (dict, list)](data: T, fname: str) -> None: with Path(fname).open("w", encoding="utf-8") as f: json.dump(data, f) -def load_json(fname: str, default_factory: type[T]) -> T: +def load_json[T: (dict, list)](fname: str, default_factory: type[T]) -> T: try: with Path(fname).open(encoding="utf-8") as f: data = json.load(f)