From a479f84e3d2fe8f8a1652039d66cd94bad309fd5 Mon Sep 17 00:00:00 2001 From: pyob-bot Date: Thu, 28 May 2026 09:38:42 +0000 Subject: [PATCH] Refactor: Add type hinting and docstrings to EntranceController methods --- src/pyob/entrance.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyob/entrance.py b/src/pyob/entrance.py index 3d4d708..7ee4463 100644 --- a/src/pyob/entrance.py +++ b/src/pyob/entrance.py @@ -453,7 +453,8 @@ def _run_git_command(self, cmd: list[str]) -> bool: def detect_symbolic_ripples( self, old: str, new: str, source_file: str ) -> list[str]: - diff = list(difflib.unified_diff(old.splitlines(), new.splitlines())) + """Detects files impacted by symbolic changes.""" + diff: list[str] = list(difflib.unified_diff(old.splitlines(), new.splitlines())) changed_text = "\n".join( [line for line in diff if line.startswith("+") or line.startswith("-")] ) @@ -466,7 +467,10 @@ def detect_symbolic_ripples( impacted_files.append(target_file) return list(set(impacted_files)) - def update_analysis_for_single_file(self, target_abs_path: str, rel_path: str): + def update_analysis_for_single_file( + self, target_abs_path: str, rel_path: str + ) -> None: + """Updates the analysis markdown for a specific file.""" if not os.path.exists(self.analysis_path): return with open(target_abs_path, "r", encoding="utf-8", errors="ignore") as f: