(candidate: dict[str, Any])
| 279 | |
| 280 | |
| 281 | def candidate_decision(candidate: dict[str, Any]) -> tuple[bool, str]: |
| 282 | quality = int(candidate.get("quality") or 0) |
| 283 | decision = norm_text(candidate.get("decision") or candidate.get("final_decision")) |
| 284 | if quality <= 2: |
| 285 | return False, "quality≤2" |
| 286 | if quality >= 4: |
| 287 | return True, "" |
| 288 | if quality == 3 and decision in {"accept", "accepted", "true", "yes", "收录"}: |
| 289 | return True, "" |
| 290 | return False, "quality=3未显式收录" |
| 291 | |
| 292 | |
| 293 | def readme_update_decision(source: dict[str, Any], category_ids: set[str]) -> tuple[bool, str]: |
no test coverage detected