Name an item by its key without a fallback no ranking reaches
CI / tests (pull_request) Successful in 4m3s
CI / tests (pull_request) Successful in 4m3s
This commit is contained in:
@@ -261,7 +261,7 @@ def start_order(epic: Planned, issues: list[EpicIssue]) -> list[str] | Failure:
|
||||
items = [ranking.EpicItem(item_of(issue, numbers, before(issue, by_key, issues)), repo_of(epic, issue)) for issue in held]
|
||||
ranked = ranking.ranked(items, weighed.formula, weighed.goals, weighed.repos)
|
||||
if isinstance(ranked, Failure):
|
||||
return Failure(re.sub(r"\bitem (\d+)\b", lambda named: keys.get(int(named[1]), named[0]), ranked.reason))
|
||||
return Failure(re.sub(r"\bitem (\d+)\b", lambda named: keys[int(named[1])], ranked.reason))
|
||||
return [keys[item.id] for item, _ in ranked]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user