[loop-cycle-1] fix: lint errors — ambiguous vars + unused import (#123) (#124)

This commit is contained in:
2026-03-15 08:07:19 -04:00
parent aa01bb9dbe
commit cf48b7d904
2 changed files with 65 additions and 66 deletions

View File

@@ -630,7 +630,7 @@ class ThinkingEngine:
if new_corr:
# Count entries (assuming each entry starts with a timestamp or header)
line_count = len([l for l in new_corr.splitlines() if l.strip()])
line_count = len([line for line in new_corr.splitlines() if line.strip()])
parts.append(
f"Workspace: {line_count} new correspondence entries (latest from: Hermes)"
)
@@ -854,10 +854,12 @@ class ThinkingEngine:
if new_corr or new_inbox:
if new_corr:
line_count = len([l for l in new_corr.splitlines() if l.strip()])
line_count = len([line for line in new_corr.splitlines() if line.strip()])
logger.info("Workspace: processed %d new correspondence entries", line_count)
if new_inbox:
logger.info("Workspace: processed %d new inbox files: %s", len(new_inbox), new_inbox)
logger.info(
"Workspace: processed %d new inbox files: %s", len(new_inbox), new_inbox
)
# Mark as seen to update the state file
workspace_monitor.mark_seen()

View File

@@ -1,10 +1,7 @@
"""Tests for timmy.workspace — Workspace heartbeat monitoring."""
import pytest
from timmy.workspace import WorkspaceMonitor
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
@@ -13,9 +10,9 @@ from timmy.workspace import WorkspaceMonitor
def _make_monitor(tmp_path, monkeypatch):
"""Create a WorkspaceMonitor with tmp_path as the repo_root."""
# Mock repo_root to use tmp_path
monkeypatch.setattr("timmy.workspace.settings", type("obj", (object,), {
"repo_root": str(tmp_path)
})())
monkeypatch.setattr(
"timmy.workspace.settings", type("obj", (object,), {"repo_root": str(tmp_path)})()
)
state_path = tmp_path / "workspace_state.json"
return WorkspaceMonitor(state_path=state_path)