From 948db577639a64123bf0c0dcb03588da7772669c Mon Sep 17 00:00:00 2001 From: AndyMik90 Date: Fri, 19 Dec 2025 11:13:35 +0100 Subject: [PATCH] chore: code cleanup and test fixture updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Apply ruff formatting to workspace_commands.py - Remove unnecessary f-string in workspace.py - Remove unused import get_phase_config from spec_runner.py - Add phase_name parameter to mock_run_agent_fn fixture 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- auto-claude/cli/workspace_commands.py | 4 +++- auto-claude/core/workspace.py | 2 +- auto-claude/runners/spec_runner.py | 2 +- tests/conftest.py | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/auto-claude/cli/workspace_commands.py b/auto-claude/cli/workspace_commands.py index e93d02a0..81152d57 100644 --- a/auto-claude/cli/workspace_commands.py +++ b/auto-claude/cli/workspace_commands.py @@ -31,7 +31,9 @@ from workspace import ( from .utils import print_banner -def _get_changed_files_from_git(worktree_path: Path, base_branch: str = "main") -> list[str]: +def _get_changed_files_from_git( + worktree_path: Path, base_branch: str = "main" +) -> list[str]: """ Get list of changed files from git diff between base branch and HEAD. diff --git a/auto-claude/core/workspace.py b/auto-claude/core/workspace.py index cb157e02..0349a821 100644 --- a/auto-claude/core/workspace.py +++ b/auto-claude/core/workspace.py @@ -189,7 +189,7 @@ def merge_existing_build( ) print() print("Example:") - print(highlight(f" git checkout main # or your feature branch")) + print(highlight(" git checkout main # or your feature branch")) print(highlight(f" python auto-claude/run.py --spec {spec_name} --merge")) return False diff --git a/auto-claude/runners/spec_runner.py b/auto-claude/runners/spec_runner.py index b0605412..660ab6d2 100644 --- a/auto-claude/runners/spec_runner.py +++ b/auto-claude/runners/spec_runner.py @@ -92,7 +92,7 @@ elif dev_env_file.exists(): load_dotenv(dev_env_file) from debug import debug, debug_error, debug_section, debug_success -from phase_config import get_phase_config, resolve_model_id +from phase_config import resolve_model_id from review import ReviewState from spec import SpecOrchestrator from ui import Icons, highlight, icon, muted, print_section, print_status diff --git a/tests/conftest.py b/tests/conftest.py index ba30efe0..44ff36a4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -602,6 +602,7 @@ def mock_run_agent_fn(): async def _mock_agent( prompt_file: str, additional_context: str = None, + phase_name: str = None, ) -> tuple[bool, str]: nonlocal call_count if side_effect is not None: