Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion docs/badge_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"<!-- md:(\w+) (.*) -->", replace, markdown, flags=re.I | re.M)
return re.sub(
r"<!-- md:(\w+) (.*) -->", replace, markdown, flags=re.IGNORECASE | re.MULTILINE
)


# -----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/cli_gen.pyi
Original file line number Diff line number Diff line change
@@ -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: ...
7 changes: 4 additions & 3 deletions docs/gen_cli_doc.py
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion docs/license_gen.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down