Skip to content

Commit 848500d

Browse files
committed
style: clear 11 ruff errors (ruff check --fix)
9x I001 unsorted imports, F401 unused pathlib.Path in cli/tools/federate.py, F541 placeholder-less f-string in services/task_store.py. Unblocks the Lint job.
1 parent 544ced8 commit 848500d

11 files changed

Lines changed: 11 additions & 15 deletions

cli/tools/compress.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
from concurrent.futures import ThreadPoolExecutor, as_completed
99
from pathlib import Path
1010

11-
from core import count_tokens
12-
1311
from cli.tools._helpers import finalize_with_tokens, show_token_ratios
12+
from core import count_tokens
1413

1514

1615
def _run_memory_mcp_cli(args: list, cwd: str, timeout: int = 30) -> tuple:

cli/tools/federate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
not comparable across corpora, so no interleaved ranking.
88
"""
99

10-
from pathlib import Path
1110

1211
# Budget split for scope='all': the parent keeps the lion's share.
1312
_PARENT_BUDGET_SHARE = 0.6

cli/tools/filter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
import re
1111
from pathlib import Path
1212

13-
from core import count_tokens
14-
1513
from cli.tools._helpers import finalize_with_tokens, show_token_ratios
14+
from core import count_tokens
1615

1716

1817
def handle_filter(file_path: str, text: str, pattern: str, max_lines: int,

cli/tools/read.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
from pathlib import Path
77
from typing import Any
88

9-
from core import count_tokens
10-
119
from cli.tools._helpers import finalize_with_tokens
10+
from core import count_tokens
1211

1312

1413
def _coerce_list(val: Any) -> list[str] | None:

cli/tools/search.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
from concurrent.futures import ThreadPoolExecutor, as_completed
66
from pathlib import Path
77

8-
from core import count_tokens
9-
108
from cli.tools._helpers import finalize_with_tokens, show_token_ratios
9+
from core import count_tokens
1110

1211
# Hard cap: responses above this are truncated to avoid filling context.
1312
_RESPONSE_TOKEN_CAP = 2400

services/artifact_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
from services.artifact_defs import (
3434
ArtifactUnit,
35+
_norm,
3536
classify_path,
3637
discover_units,
37-
_norm,
3838
)
3939

4040
SCHEMA_VERSION = 1

services/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from core.ide import get_profile, load_ide_config
1414
from services.activity_log import ActivityLog
1515
from services.agents import create_agents
16+
from services.artifact_store import ArtifactStore
1617
from services.claude_md import ClaudeMdManager
1718
from services.compressor import CodeCompressor
1819
from services.context_snapshot import ContextSnapshot
@@ -39,7 +40,6 @@
3940
from services.task_store import TaskStore
4041
from services.validation_cache import ValidationCache
4142
from services.vector_store import VectorStore
42-
from services.artifact_store import ArtifactStore
4343
from services.watcher import CodeWatcher
4444

4545

services/task_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _set_lifecycle(self, collection, ref, lifecycle) -> dict:
288288
def purge_archived(self, entity="task") -> dict:
289289
key = {"task": "tasks", "milestone": "milestones", "note": "notes"}.get(entity)
290290
if not key:
291-
return {"error": f"entity must be task|milestone|note"}
291+
return {"error": "entity must be task|milestone|note"}
292292
with self._lock:
293293
doc = self._load()
294294
before = len(doc[key])

tests/test_ghost_generation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
sys.path.insert(0, str(REPO_ROOT))
3030
sys.path.insert(0, str(REPO_ROOT / "cli"))
3131

32-
from services.win_subprocess import harden_win_argv, is_batch_shim # noqa: E402
3332
from hook_ghost_files import sweep_ghost_files # noqa: E402
3433

34+
from services.win_subprocess import harden_win_argv, is_batch_shim # noqa: E402
35+
3536
WINDOWS = sys.platform == "win32"
3637

3738
# Adversarial payloads drawn from real observed ghost filenames. Each, on the

tests/test_hook_smoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
sys.modules.setdefault("_hook_utils", _hook_utils)
1919

20+
import cli.hook_artifact as hook_artifact # noqa: E402
2021
import cli.hook_auto_snapshot as hook_auto_snapshot # noqa: E402
2122
import cli.hook_c3_signal as hook_c3_signal # noqa: E402
22-
import cli.hook_artifact as hook_artifact # noqa: E402
2323
import cli.hook_c3read as hook_c3read # noqa: E402
2424
import cli.hook_edit_ledger as hook_edit_ledger # noqa: E402
2525
import cli.hook_edit_unlock as hook_edit_unlock # noqa: E402

0 commit comments

Comments
 (0)