mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
style: fix lint issues in new Phase4.1/Phase5 code
This commit is contained in:
parent
2c21926444
commit
98ef3b83db
2 changed files with 15 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ def classify_signals(query: str) -> QuerySignals:
|
|||
title_like_tokens: list[str] = []
|
||||
content_terms: list[str] = []
|
||||
|
||||
lowered = [t.lower() for t in raw_tokens]
|
||||
_lowered = [t.lower() for t in raw_tokens]
|
||||
content_keywords = {
|
||||
"hz",
|
||||
"v/cm",
|
||||
|
|
@ -179,10 +179,19 @@ def build_query_plan(query: str, intent: str) -> dict:
|
|||
]
|
||||
)
|
||||
suggested_modes = [
|
||||
{"mode": "ocr_evidence_layer", "description": "Check OCR role-index for exact evidence blocks (body, captions, references)."},
|
||||
{"mode": "metadata_narrow", "description": "Narrow by domain/year/author for targeted evidence verification."},
|
||||
{"mode": "read_fulltext", "description": "Read structured fulltext for context around evidence hits."},
|
||||
] # fmt: skip
|
||||
{
|
||||
"mode": "ocr_evidence_layer",
|
||||
"description": "Check OCR role-index for exact evidence blocks.",
|
||||
},
|
||||
{
|
||||
"mode": "metadata_narrow",
|
||||
"description": "Narrow by domain/year/author for targeted verification.",
|
||||
},
|
||||
{
|
||||
"mode": "read_fulltext",
|
||||
"description": "Read structured fulltext for evidence context.",
|
||||
},
|
||||
]
|
||||
elif intent == "content":
|
||||
content_query = (
|
||||
" ".join(signals.content_terms or signals.title_like_tokens or tokenize(query)[:6]).strip() or query.strip()
|
||||
|
|
|
|||
|
|
@ -89,10 +89,7 @@ def summarize_ocr_runtime_followups(
|
|||
derived_stale = [p for p in papers if p.get("derived_stale") and not p.get("raw_upgradable")]
|
||||
raw_upgradable = [p for p in papers if p.get("raw_upgradable")]
|
||||
|
||||
if dirty_runtime_files:
|
||||
mode = "suppressed_dirty_runtime"
|
||||
else:
|
||||
mode = "deferred"
|
||||
mode = "suppressed_dirty_runtime" if dirty_runtime_files else "deferred"
|
||||
|
||||
result: dict = {
|
||||
"derived_rebuild_count": len(derived_stale),
|
||||
|
|
|
|||
Loading…
Reference in a new issue