From ff29e20873743704e9a859212a703e3cf6901002 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 10 May 2026 11:53:14 -0400 Subject: [PATCH] refactor(infra): cull unused infrastructure and file cache helpers --- src/external_editor.py | 11 ----------- src/file_cache.py | 9 --------- src/project_manager.py | 9 --------- tests/test_external_editor.py | 1 - 4 files changed, 30 deletions(-) diff --git a/src/external_editor.py b/src/external_editor.py index f8e1f8e..39c6608 100644 --- a/src/external_editor.py +++ b/src/external_editor.py @@ -140,17 +140,6 @@ def get_default_launcher() -> ExternalEditorLauncher: return launcher -def resolve_project_editor_override(project_path: Optional[str]) -> Optional[str]: - if not project_path: - return None - from src import models - try: - proj = models.load_project(project_path) - return proj.get("default_editor") - except Exception: - return None - - def create_temp_modified_file(content: str) -> str: """ [C: src/gui_2.py:App._open_patch_in_external_editor, tests/test_external_editor.py:TestHelperFunctions.test_create_temp_modified_file] diff --git a/src/file_cache.py b/src/file_cache.py index 2fbb091..c4822e1 100644 --- a/src/file_cache.py +++ b/src/file_cache.py @@ -704,15 +704,6 @@ class ASTParser: def reset_client() -> None: pass -def content_block_type(path: Path) -> str: - return "unsupported" - def get_file_id(path: Path) -> Optional[str]: return None -def evict(path: Path) -> None: - pass - -def list_cached() -> List[Dict[str, Any]]: - return [] - diff --git a/src/project_manager.py b/src/project_manager.py index 0d506af..8ee9d38 100644 --- a/src/project_manager.py +++ b/src/project_manager.py @@ -87,15 +87,6 @@ def get_git_commit(git_dir: str) -> str: except Exception: return "" -def get_git_log(git_dir: str, n: int = 5) -> str: - try: - r = subprocess.run( - ["git", "log", "--oneline", f"-{n}"], - capture_output=True, text=True, cwd=git_dir, timeout=5, - ) - return r.stdout.strip() if r.returncode == 0 else "" - except Exception: - return "" # ── default structures ─────────────────────────────────────────────────────── def default_discussion() -> dict[str, Any]: diff --git a/tests/test_external_editor.py b/tests/test_external_editor.py index 1c6da6c..72ad042 100644 --- a/tests/test_external_editor.py +++ b/tests/test_external_editor.py @@ -5,7 +5,6 @@ from src.models import TextEditorConfig, ExternalEditorConfig from src.external_editor import ( ExternalEditorLauncher, get_default_launcher, - resolve_project_editor_override, create_temp_modified_file, )