chore: dead code cleanup (pyflakes-clean)
Some checks failed
Build & Push Docker Image / build-and-push (push) Has been cancelled
Tests / test (push) Has been cancelled

- Remove unused imports: time/asyncio/Path/Optional/re/Counter/jieba
  across backfill_embeddings, bucket_manager, embedding_engine, import_memory
- Drop unused local var `old_primary` in reclassify_domains
- Fix 3 placeholder-less f-strings in backfill_embeddings, migrate_to_domains,
  reclassify_domains
- Delete legacy quick-check scripts test_smoke.py / test_tools.py (replaced
  by tests/ pytest suite, never collected by pytest)
- Delete backup_20260405_2124/ (stale local snapshot, no code references)

Verified: pyflakes *.py → 0 warnings; pytest tests/ → 237 passed, 7 skipped.
This commit is contained in:
P0luz
2026-04-21 20:11:47 +08:00
parent 71154d905f
commit 529c9cc172
12 changed files with 3 additions and 2035 deletions

View File

@@ -165,7 +165,6 @@ def reclassify():
new_domains = classify(body, old_domains)
primary = sanitize_name(new_domains[0])
old_primary = sanitize_name(old_domains[0]) if old_domains else "未分类"
if name and name != bucket_id:
new_filename = f"{sanitize_name(name)}_{bucket_id}.md"
@@ -197,7 +196,7 @@ def reclassify():
os.rmdir(dp)
print(f"\n 🗑 删除空目录: {d}/")
print(f"\n重分类完成。\n")
print("\n重分类完成。\n")
# 展示新结构
print("=== 新目录结构 ===")