From f303387198dec786c780c4072ddb44452dd26a73 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:59:35 +0000 Subject: [PATCH 1/2] chore: 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.15.22 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb83383..b6e2d44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: exclude: '^\.yarn/releases/yarn.*js' args: ["--fix=lf"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.0 hooks: # Run the python linter. - id: ruff-check From 97c7a4833e39b6b2d4c5e0174549f885f50a4203 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 16:59:55 +0000 Subject: [PATCH 2/2] chore: auto fixes from pre-commit.com hooks --- docs/badge_hook.py | 5 ++++- docs/cli_gen.pyi | 4 ++-- docs/gen_cli_doc.py | 7 ++++--- docs/license_gen.py | 3 ++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/badge_hook.py b/docs/badge_hook.py index 84b37ef..8788b08 100644 --- a/docs/badge_hook.py +++ b/docs/badge_hook.py @@ -2,6 +2,7 @@ import re from re import Match + from mkdocs.config.defaults import MkDocsConfig from mkdocs.structure.files import Files from mkdocs.structure.pages import Page @@ -25,7 +26,9 @@ def replace(match: Match): raise RuntimeError(f"Unknown badge type: {badge_type}") # Find and replace all external asset URLs in current page - return re.sub(r"", replace, markdown, flags=re.I | re.M) + return re.sub( + r"", replace, markdown, flags=re.IGNORECASE | re.MULTILINE + ) # ----------------------------------------------------------------------------- diff --git a/docs/cli_gen.pyi b/docs/cli_gen.pyi index 9370c53..d99c7e9 100644 --- a/docs/cli_gen.pyi +++ b/docs/cli_gen.pyi @@ -1,3 +1,3 @@ -from typing import Dict, Any +from typing import Any -def generate_cli_doc(metadata: Dict[str, Dict[str, Any]]) -> str: ... +def generate_cli_doc(metadata: dict[str, dict[str, Any]]) -> str: ... diff --git a/docs/gen_cli_doc.py b/docs/gen_cli_doc.py index 3378cf5..68f8245 100644 --- a/docs/gen_cli_doc.py +++ b/docs/gen_cli_doc.py @@ -1,7 +1,8 @@ from pathlib import Path -from typing import Dict, Any -import yaml +from typing import Any + import mkdocs_gen_files +import yaml from cli_gen import generate_cli_doc FILENAME = "cli.md" @@ -25,7 +26,7 @@ with mkdocs_gen_files.open(FILENAME, "w") as io_doc: options_versions = Path(__file__).parent / "cli.yml" - versions: Dict[str, Any] = yaml.safe_load(options_versions.read_bytes()) + versions: dict[str, Any] = yaml.safe_load(options_versions.read_bytes()) print("# Command Line Interface\n", file=io_doc) print(VERSION_DISCLAIMER, file=io_doc) diff --git a/docs/license_gen.py b/docs/license_gen.py index b7450fc..b5b82fd 100644 --- a/docs/license_gen.py +++ b/docs/license_gen.py @@ -1,7 +1,8 @@ import re -import mkdocs_gen_files from subprocess import run +import mkdocs_gen_files + FILENAME = "other-licenses.md" INTRO = """# Third-party Licenses