Answer prose round 1: 1 🔴, 10 🟡 (0 misread); say which tools still parse todo.md and how, drop the door metaphor, and reword the help, the rule's hand edits and six docstrings
This commit is contained in:
@@ -26,7 +26,7 @@ def plan_name(default: str, outside: pathlib.Path | None) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def planned(todo: plan_stores.Plan | Failure, cut: LastCut, default: str, branch: str, outside: pathlib.Path | None = None) -> Plan | NoItem:
|
def planned(todo: plan_stores.Plan | Failure, cut: LastCut, default: str, branch: str, outside: pathlib.Path | None = None) -> Plan | NoItem:
|
||||||
"""The plan in todo, the plan plan_name names as its store read it, with the item the next chunk takes first, release_standing.chunk_item's pick; else why there is none. branch is the project's `branch` template."""
|
"""todo, which is the project's plan as its store read it and which plan_name names, with the item the next chunk takes first, release_standing.chunk_item's pick; else why there is none. branch is the project's `branch` template."""
|
||||||
where = plan_name(default, outside)
|
where = plan_name(default, outside)
|
||||||
if isinstance(todo, NoItemsTable):
|
if isinstance(todo, NoItemsTable):
|
||||||
return NoItem(f"{where} holds no items table.")
|
return NoItem(f"{where} holds no items table.")
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from release_plan.todo_table import Item, parse_row, SHAPE, Table
|
|||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class MemoryPlan:
|
class MemoryPlan:
|
||||||
"""A plan held in memory, as a tracker holds one: in the order filed, unranked, with no bar. Set fails to make every read and write fail with that reason."""
|
"""A plan held in memory, as a tracker holds one: in the order filed, unranked, with no bar. Where fails is set, every read and write fails with it as the reason."""
|
||||||
rows: dict[int, dict[str, str]] = dataclasses.field(default_factory=dict)
|
rows: dict[int, dict[str, str]] = dataclasses.field(default_factory=dict)
|
||||||
details: dict[int, str] = dataclasses.field(default_factory=dict)
|
details: dict[int, str] = dataclasses.field(default_factory=dict)
|
||||||
next_id: int = 1
|
next_id: int = 1
|
||||||
@@ -39,7 +39,7 @@ class MemoryPlan:
|
|||||||
return Written(id_)
|
return Written(id_)
|
||||||
|
|
||||||
def put(self, id_: int, row: dict[str, str], detail: str) -> Written | Failure:
|
def put(self, id_: int, row: dict[str, str], detail: str) -> Written | Failure:
|
||||||
"""Holds row as item id_ where it reads as an item."""
|
"""Holds row as item id_, or fails where row's cells don't make an item."""
|
||||||
if self.fails:
|
if self.fails:
|
||||||
return Failure(self.fails)
|
return Failure(self.fails)
|
||||||
row = row | {"Item": bold_cell(plain(row.get("Item", "")))}
|
row = row | {"Item": bold_cell(plain(row.get("Item", "")))}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class LastCut:
|
|||||||
changelog: str | Failure
|
changelog: str | Failure
|
||||||
# How many commits follow the tag; on a branch with no tag, those after the commit that added the newest dated CHANGELOG.md heading, or all of them where it has none.
|
# How many commits follow the tag; on a branch with no tag, those after the commit that added the newest dated CHANGELOG.md heading, or all of them where it has none.
|
||||||
commits: int | Failure
|
commits: int | Failure
|
||||||
# todo.md's text at the tag and at each later commit that changed it, oldest first, as named_releases reads them; where the branch has no tag, at each commit that changed it. Empty where the tags cannot be read.
|
# todo.md's text at the tag and at each later commit that changed it, oldest first, as named_releases reads them; where the branch has no tag, at each commit that changed it. Empty where the tags cannot be read, and where no commit holds the plan.
|
||||||
todos_since: list[str] | Failure
|
todos_since: list[str] | Failure
|
||||||
# Whether a release review has landed since the tag, as release_reviewed reads it.
|
# Whether a release review has landed since the tag, as release_reviewed reads it.
|
||||||
reviewed: bool | Failure = False
|
reviewed: bool | Failure = False
|
||||||
|
|||||||
Reference in New Issue
Block a user