fix: ruff lint + format fixes in tests, ESLint fixes in frontend

This commit is contained in:
2026-07-17 21:28:58 +02:00
parent 341d0c6f38
commit fbb1b39b57
56 changed files with 1399 additions and 721 deletions
+10 -2
View File
@@ -98,10 +98,18 @@ def _parse_response(raw_content: str) -> dict[str, Any]:
data = json.loads(text[start : end + 1])
except json.JSONDecodeError:
logger.error("Failed to parse OpenRouter response: %s", text[:200])
return {"structured_data": {}, "confidence_score": 0.0, "raw_text": raw_content}
return {
"structured_data": {},
"confidence_score": 0.0,
"raw_text": raw_content,
}
else:
logger.error("No JSON found in OpenRouter response: %s", text[:200])
return {"structured_data": {}, "confidence_score": 0.0, "raw_text": raw_content}
return {
"structured_data": {},
"confidence_score": 0.0,
"raw_text": raw_content,
}
# Extract confidence score (may be inside or outside the data)
confidence = data.pop("confidence_score", None)