feat(system): chore(lint): ruff auto-fix sweep — 303 errors across 178 files (F401 unused imports + F541 f-string placeholders + F811 redefined); restored report_error re-export + added logger call in errors.py (#333)
* feat(system): fix(windows-ci): combine pip bootstrap fix + venv activation in Verify step Combines both fixes needed to get windows-test.yml actually passing: 1. setup.sh: stop swallowing ensurepip errors (quiet + 2>/dev/null + || true was hiding real failures — pip was silently not installed). Add get-pip.py fallback and hard pip verification. 2. windows-test.yml: add 'source .venv/Scripts/activate' to Verify step. Each CI step gets a fresh shell — setup.sh's venv activation doesn't carry over, so drone wasn't on PATH in the subsequent step. Together, these should take Windows CI from the 'silent failure every run since creation' state to actually green. Supersedes PRs #330 and #331 which had the fixes on separate branches (neither green alone). Co-Authored-By: @devpulse <devpulse@aipass> * feat(system): chore(lint): ruff auto-fix sweep — 303 errors across 178 files (F401 unused imports + F541 f-string placeholders + F811 redefined); restored report_error re-export + added logger call in errors.py Co-Authored-By: @devpulse <devpulse@aipass> --------- Co-authored-by: @devpulse <devpulse@aipass>
This commit is contained in:
@@ -34,12 +34,11 @@ from aipass.prax.apps.modules.logger import system_logger as logger
|
||||
|
||||
# Rich library components
|
||||
from rich.table import Table
|
||||
from rich.columns import Columns
|
||||
from rich.panel import Panel
|
||||
from rich import box
|
||||
|
||||
# CLI modules (showcasing our own services!)
|
||||
from aipass.cli.apps.modules.display import console as CONSOLE, header, success, error, warning, section
|
||||
from aipass.cli.apps.modules.display import console as CONSOLE, header, error
|
||||
|
||||
VERSION = "2.0.0"
|
||||
CLI_ROOT = Path(__file__).parent
|
||||
|
||||
@@ -202,7 +202,7 @@ def print_help():
|
||||
_cli_root = _display_path.parents[2] # display.py -> modules -> apps -> cli
|
||||
CONSOLE.print(f" [yellow]Module:[/yellow] [dim]{_display_path}[/dim]")
|
||||
CONSOLE.print(f" [yellow]Handlers:[/yellow] [dim]{_cli_root / 'apps' / 'handlers' / 'display'}[/dim]")
|
||||
CONSOLE.print(f" [yellow]Standards:[/yellow] [dim]See CODE_STANDARDS/cli.md[/dim]")
|
||||
CONSOLE.print(" [yellow]Standards:[/yellow] [dim]See CODE_STANDARDS/cli.md[/dim]")
|
||||
CONSOLE.print()
|
||||
CONSOLE.print("─" * 70)
|
||||
CONSOLE.print()
|
||||
|
||||
@@ -263,7 +263,7 @@ def _handle_init(args: List[str]) -> bool:
|
||||
if result.get("aipass_home"):
|
||||
console.print()
|
||||
console.print(f"[bold cyan]AIPASS_HOME:[/bold cyan] [yellow]{result['aipass_home']}[/yellow]")
|
||||
console.print(f"[dim]For terminal usage, add to your shell profile:[/dim]")
|
||||
console.print("[dim]For terminal usage, add to your shell profile:[/dim]")
|
||||
console.print(f" [green]export AIPASS_HOME={result['aipass_home']}[/green]")
|
||||
|
||||
json_handler.log_operation("aipass_init", {
|
||||
@@ -275,9 +275,9 @@ def _handle_init(args: List[str]) -> bool:
|
||||
# Next steps
|
||||
console.print()
|
||||
console.print("[bold cyan]Next steps:[/bold cyan]")
|
||||
console.print(f" [green]1.[/green] Create your first agent: [yellow]aipass init agent <name>[/yellow]")
|
||||
console.print(f" [green]2.[/green] Start a session: [dim]cd src/<name>/ && claude[/dim]")
|
||||
console.print(f" [green]3.[/green] Read the docs: [dim]cat README.md[/dim]")
|
||||
console.print(" [green]1.[/green] Create your first agent: [yellow]aipass init agent <name>[/yellow]")
|
||||
console.print(" [green]2.[/green] Start a session: [dim]cd src/<name>/ && claude[/dim]")
|
||||
console.print(" [green]3.[/green] Read the docs: [dim]cat README.md[/dim]")
|
||||
console.print()
|
||||
|
||||
return True
|
||||
|
||||
@@ -7,7 +7,6 @@ use tmp_path to stay fully isolated from the live filesystem.
|
||||
import json
|
||||
import uuid
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import pytest
|
||||
from rich.console import Console
|
||||
|
||||
from aipass.cli.apps.modules import display
|
||||
from aipass.cli.apps.modules.display import header, success, error, warning, section, fatal
|
||||
|
||||
|
||||
# =============================================================================
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"""Tests for the CLI init_project module — aipass command routing and init orchestration."""
|
||||
|
||||
from io import StringIO
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from rich.console import Console
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
|
||||
import pytest
|
||||
from io import StringIO
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import patch
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from aipass.cli.apps.modules import templates
|
||||
from aipass.cli.apps.modules import display
|
||||
from aipass.cli.apps.modules.templates import operation_start, operation_complete
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user