From 8edaae8d8c83803a8f6819364602bbc06f6bff1a Mon Sep 17 00:00:00 2001 From: Mads Hvelplund Date: Thu, 18 Jun 2026 19:36:07 +0200 Subject: [PATCH] fix: resolve pre-commit check failures - Change RuntimeError to TypeError for type validation in report/writer.py - Update pyupgrade to v3.21.2 for Python 3.14 compatibility --- .pre-commit-config.yaml | 2 +- strix/report/writer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0a95523..15968049 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: # Additional Python code quality checks - repo: https://github.com/asottile/pyupgrade - rev: v3.20.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py312-plus] diff --git a/strix/report/writer.py b/strix/report/writer.py index 8118fe9f..a7c2146d 100644 --- a/strix/report/writer.py +++ b/strix/report/writer.py @@ -27,7 +27,7 @@ def read_run_record(run_dir: Path) -> dict[str, Any]: except (OSError, json.JSONDecodeError) as exc: raise RuntimeError(f"run.json at {path} is unreadable: {exc}") from exc if not isinstance(data, dict): - raise RuntimeError(f"run.json at {path} is not an object") + raise TypeError(f"run.json at {path} is not an object") return data