diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09637eb33c708..d936fe5578c39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,7 +73,7 @@ repos: pass_filenames: false # This makes it a lot faster - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.9.1 hooks: - id: ruff-format - id: ruff @@ -91,12 +91,12 @@ repos: # zizmor detects security vulnerabilities in GitHub Actions workflows. # Additional configuration for the tool is found in `.github/zizmor.yml` - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.0.0 + rev: v1.0.1 hooks: - id: zizmor - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.30.0 + rev: 0.31.0 hooks: - id: check-github-workflows diff --git a/scripts/check_docs_formatted.py b/scripts/check_docs_formatted.py index 7a8135e00203d..7f576988fd945 100755 --- a/scripts/check_docs_formatted.py +++ b/scripts/check_docs_formatted.py @@ -159,7 +159,7 @@ def _snipped_match(match: Match[str]) -> str: case _: # We are only interested in checking the formatting of py or pyi code # blocks so we can return early if the language is not one of these. - return f'{match["before"]}{match["code"]}{match["after"]}' + return f"{match['before']}{match['code']}{match['after']}" code = textwrap.dedent(match["code"]) try: @@ -170,7 +170,7 @@ def _snipped_match(match: Match[str]) -> str: raise e code = textwrap.indent(code, match["indent"]) - return f'{match["before"]}{code}{match["after"]}' + return f"{match['before']}{code}{match['after']}" src = SNIPPED_RE.sub(_snipped_match, src) return src, errors diff --git a/scripts/check_ecosystem.py b/scripts/check_ecosystem.py index d7fb1837de460..86729d4347265 100755 --- a/scripts/check_ecosystem.py +++ b/scripts/check_ecosystem.py @@ -104,9 +104,9 @@ async def _get_commit(self: Self, checkout_dir: Path) -> str: stdout=PIPE, ) git_sha_stdout, _ = await git_sha_process.communicate() - assert ( - await git_sha_process.wait() == 0 - ), f"Failed to retrieve commit sha at {checkout_dir}" + assert await git_sha_process.wait() == 0, ( + f"Failed to retrieve commit sha at {checkout_dir}" + ) return git_sha_stdout.decode().strip() diff --git a/scripts/generate_mkdocs.py b/scripts/generate_mkdocs.py index 25e2d667abb12..a90d85b7fdaad 100644 --- a/scripts/generate_mkdocs.py +++ b/scripts/generate_mkdocs.py @@ -258,7 +258,7 @@ def main() -> None: { "redirects": { "redirect_maps": { - f'rules/{rule["code"]}.md': f'rules/{rule["name"]}.md' + f"rules/{rule['code']}.md": f"rules/{rule['name']}.md" for rule in rules }, }, diff --git a/scripts/knot_benchmark/src/benchmark/cases.py b/scripts/knot_benchmark/src/benchmark/cases.py index ed57e8eb5fbee..25eecf59210b6 100644 --- a/scripts/knot_benchmark/src/benchmark/cases.py +++ b/scripts/knot_benchmark/src/benchmark/cases.py @@ -26,9 +26,9 @@ class Benchmark(enum.Enum): def which_tool(name: str) -> Path: tool = shutil.which(name) - assert ( - tool is not None - ), f"Tool {name} not found. Run the script with `uv run