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:
AIPass
2026-04-16 12:58:53 -07:00
committed by GitHub
co-authored by @devpulse
parent bf1f37bf41
commit e2c868084a
180 changed files with 105 additions and 282 deletions
+2 -5
View File
@@ -30,8 +30,6 @@ import json
import sys
from io import StringIO
from pathlib import Path
from typing import Any
from unittest.mock import MagicMock
import pytest
@@ -52,7 +50,7 @@ def _fresh_json_handler(monkeypatch):
saved_mf = sys.modules.pop("aipass.memory.apps.handlers.json.memory_files", None)
try:
import aipass.memory.apps.handlers.json # noqa: F811
pass # noqa: F811
except Exception:
if saved_json_pkg is not None:
sys.modules["aipass.memory.apps.handlers.json"] = saved_json_pkg
@@ -63,7 +61,6 @@ def _fresh_json_handler(monkeypatch):
importlib.reload(existing)
else:
sys.modules.pop(jh_key, None)
import aipass.memory.apps.handlers.json.json_handler # noqa: F811
yield
@@ -77,7 +74,7 @@ def _get_memory_files():
"""Import and return the memory_files module."""
mf_key = "aipass.memory.apps.handlers.json.memory_files"
if mf_key not in sys.modules:
import aipass.memory.apps.handlers.json.memory_files # noqa: F811
pass # noqa: F811
return sys.modules[mf_key]