diff --git a/src/ai_reviewer/__pycache__/diff.cpython-311.pyc b/src/ai_reviewer/__pycache__/diff.cpython-311.pyc index 646eced..18b212e 100644 Binary files a/src/ai_reviewer/__pycache__/diff.cpython-311.pyc and b/src/ai_reviewer/__pycache__/diff.cpython-311.pyc differ diff --git a/src/ai_reviewer/__pycache__/prompt.cpython-311.pyc b/src/ai_reviewer/__pycache__/prompt.cpython-311.pyc index 15701a1..1b6e88d 100644 Binary files a/src/ai_reviewer/__pycache__/prompt.cpython-311.pyc and b/src/ai_reviewer/__pycache__/prompt.cpython-311.pyc differ diff --git a/src/ai_reviewer/diff.py b/src/ai_reviewer/diff.py index 2258d95..a6afbaf 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] - p = line.split() - if len(parts) >= 4 and p[3].startswith("b/"): - current_path = p[3][len("b/") :] + parts = line.split() + if len(parts) >= 4 and parts[3].startswith("b/"): + current_path = parts[3][len("b/") :] else: current_path = None continue