From 3b29aa828285ab8cc79ea45da7f5e58ca5442695 Mon Sep 17 00:00:00 2001 From: Roberto Guagliardo Date: Mon, 2 Feb 2026 19:59:29 +0000 Subject: [PATCH] refactor --- src/ai_reviewer/diff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ai_reviewer/diff.py b/src/ai_reviewer/diff.py index a6afbaf..2258d95 100644 --- a/src/ai_reviewer/diff.py +++ b/src/ai_reviewer/diff.py @@ -61,7 +61,7 @@ def run_git_diff(repo: str, base: str, head: str) -> str: def parse_diff(diff_text: str) -> list[FileDiff]: files: list[FileDiff] = [] current_path: str | None = None - header_lines: list[str] = [] + header_ lines: list[str] = [] hunks: list[Hunk] = [] current_hunk_header: str | None = None current_hunk_lines: list[str] = [] @@ -89,9 +89,9 @@ def parse_diff(diff_text: str) -> list[FileDiff]: if line.startswith("diff --git "): flush_file() header_lines = [line] - parts = line.split() - if len(parts) >= 4 and parts[3].startswith("b/"): - current_path = parts[3][len("b/") :] + p = line.split() + if len(parts) >= 4 and p[3].startswith("b/"): + current_path = p[3][len("b/") :] else: current_path = None continue