Name the next release's items without a Touches list, and warn of them in rank_todo.py --check
CI / tests (pull_request) Successful in 4m24s
CI / tests (pull_request) Successful in 4m24s
This commit is contained in:
@@ -7,7 +7,7 @@ from plan_store.plans import cells, Plan, Written
|
||||
from failure import Failure
|
||||
from plan.todo_table import item_details, items, NoItemsTable, renames
|
||||
from plan_store import markdown_edits
|
||||
from plan.touches import predicted
|
||||
from plan.touches import predicted, unpredicted
|
||||
from plan import ranking
|
||||
from record_store.stores import RecordStore
|
||||
from text_files.file_writes import replace_file
|
||||
@@ -95,6 +95,14 @@ class FilePlan:
|
||||
unranked = [] if ranked.text == texts[0] else [f"{self.path}: not ranked; run rank_todo.py on it"]
|
||||
return unranked + [f"{self.path}: {line}" for line in ranked.under_bar + unreadable_touches(texts[0])]
|
||||
|
||||
def warnings(self) -> list[str]:
|
||||
"""What `rank_todo.py --check` says of the file without failing on it: which items of its earliest release hold no `Touches:` list."""
|
||||
plan = self.read()
|
||||
if isinstance(plan, Failure) or not plan.items:
|
||||
return []
|
||||
missing = unpredicted(plan.items, min(item.release for item in plan.items))
|
||||
return [f"{self.path}: warning: {missing}; write each as `~/.claude/rules/todo-items.md` says"] if missing else []
|
||||
|
||||
def reported(self, ranked: ranking.Ranked) -> list[str]:
|
||||
"""Ranking's notes and under-bar lines, each prefixed with the file's path, as a tool prints them on stderr."""
|
||||
return [f"{self.path}: {line}" for line in ranked.notes + ranked.under_bar]
|
||||
|
||||
Reference in New Issue
Block a user