Kill the surviving mutants of the scoring and ranking

This commit is contained in:
2026-11-16 02:50:37 +01:00
parent 9d9c5a3352
commit 727ed70ecb
5 changed files with 56 additions and 5 deletions
+2 -2
View File
@@ -336,8 +336,8 @@ def placing(answered: list[object], new: Item, value: float, scoring: ranking.Sc
return issue.key
if missing := next((name for name in SET_SCORES if name not in levels), None):
return Failure(f"{issue.key} holds no {missing}")
# Release, tagline and blockers don't change a score.
other = ranking.item_score(dataclasses.replace(new, id=issue.number, exempt=exempt, scores=levels, moves=moves), scoring, issue.key)
# Only the scores and the moves change a score.
other = ranking.item_score(dataclasses.replace(new, scores=levels, moves=moves), scoring, issue.key)
if isinstance(other, Failure) or other < value:
return other if isinstance(other, Failure) else issue.key
return None