From 794cd16d673e93300392dd2eaff65ce70b67d97e Mon Sep 17 00:00:00 2001 From: Alexey Shalaev <75322386+AlexeyShalaev@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:27:03 +0400 Subject: [PATCH] fix(ai-review): check.py passes the libraries' ruff --- packs/ai-review/.agents/review/check.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packs/ai-review/.agents/review/check.py b/packs/ai-review/.agents/review/check.py index 64a698d..a6c9f97 100644 --- a/packs/ai-review/.agents/review/check.py +++ b/packs/ai-review/.agents/review/check.py @@ -33,7 +33,10 @@ # the diffs are read by this script, not a person: no colour, external diff or textconv a config may turn on PLAIN_DIFF = ("diff", "--no-color", "--no-ext-diff", "--no-textconv") HUNK_LINES = re.compile(rb"^@@ -\d+(?:,\d+)? \+\d+(?:,\d+)? @@") -HOW = "run it in your agent (/review-change, $review-change; .agents/review/README.md) before opening or updating the pull request" +HOW = ( + "run it in your agent (/review-change, $review-change; .agents/review/README.md)" + " before opening or updating the pull request" +) REVIEWED, BEHIND, SKIPPED = "reviewed", "behind", "skipped" @@ -65,7 +68,7 @@ def main() -> int: try: status, message = check(refresh=args.refresh) - except Exception as error: # noqa: BLE001 - the hook must never block a push, so a broken check only says so + except Exception as error: # noqa: BLE001, RUF100 - the hook must never block a push, so a broken check only says so status, message = BEHIND, f"AI review: the check failed: {error!r}" if status == SKIPPED and not args.strict: return 0