(selected_papers: Optional[List[Dict]], candidates: List[str])
| 1214 | |
| 1215 | def _keyword_hit_count(selected_papers: Optional[List[Dict]], candidates: List[str]) -> int: |
| 1216 | if not selected_papers or not candidates: |
| 1217 | return 0 |
| 1218 | total = 0 |
| 1219 | normalized_candidates = [str(item).lower().replace("-", " ") for item in candidates if str(item).strip()] |
| 1220 | for paper in selected_papers: |
| 1221 | text = _paper_text(paper) |
| 1222 | if any(candidate in text for candidate in normalized_candidates): |
| 1223 | total += 1 |
| 1224 | return total |
| 1225 | |
| 1226 | |
| 1227 | def _trigger_satisfied( |
| 1228 | checkfile: Dict[str, Any], |
no test coverage detected