Answer prose round 1: 0 🔴, 2 🟡; define work landing in landed_towards again and reword the docstrings
This commit is contained in:
+5
-5
@@ -25,7 +25,7 @@ class Upcoming:
|
||||
"""The next release, and whether work has landed towards it, as `~/.claude/CLAUDE.md` → "Working loop" uses both."""
|
||||
# The earliest release after the last cut that todo.md has named since that cut or the plan holds; without a cut, the plan's earliest. None where there is none.
|
||||
release: tuple[int, int, int] | None
|
||||
# Whether it is the plan's earliest release, as it always is without a cut, even where the plan holds no item.
|
||||
# Whether it is the plan's earliest release. Without a cut, it always is, even where the plan holds no item.
|
||||
is_earliest: bool
|
||||
# Whether work has landed towards it: one or more changes are unreleased, as unreleased_changes counts them.
|
||||
landed: bool | Failure
|
||||
@@ -107,7 +107,7 @@ def chunk_item(found: list[Item], cut: LastCut) -> Pick:
|
||||
|
||||
|
||||
def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
|
||||
"""The next release after cut, and whether work has landed towards it, for the plan whose items are found.
|
||||
"""The next release after cut, and whether work has landed towards it. found holds the plan's items.
|
||||
|
||||
Cut where the plan files items under the last cut's version or earlier, and Unknown where todo.md's texts since the cut cannot be read.
|
||||
"""
|
||||
@@ -128,7 +128,7 @@ def next_release(found: list[Item], cut: LastCut) -> Upcoming | Cut | Unknown:
|
||||
|
||||
|
||||
def version_of(tag: str | None | Failure) -> tuple[int, int, int] | None:
|
||||
"""The version x.y.z that tag, the newest v* tag, names; None where it names none."""
|
||||
"""The version x.y.z named by tag, the newest v* tag; None where it names none."""
|
||||
tagged = re.fullmatch(r"v([0-9]+\.[0-9]+\.[0-9]+)", tag) if isinstance(tag, str) else None
|
||||
return None if tagged is None else release_of(tagged[1])
|
||||
|
||||
@@ -140,9 +140,9 @@ def landed(cut: LastCut) -> bool | Failure:
|
||||
|
||||
|
||||
def standing(upcoming: Upcoming, first: Item | None) -> Next | ReadyToCut | Unplanned | Unknown:
|
||||
"""How the plan stands to the next release, upcoming, with first, next_item's pick.
|
||||
"""How the plan stands to upcoming, the next release. first is next_item's pick, which the pick holds where it is Next.
|
||||
|
||||
Where the next release is the plan's earliest, the pick is Next, holding first. Else the next release holds no item: it is ready to cut once work has landed towards it, and else it is to plan.
|
||||
Unknown where the next release holds no item and the unreleased changes cannot be counted.
|
||||
"""
|
||||
if upcoming.is_earliest:
|
||||
return Next(upcoming.release, first)
|
||||
|
||||
Reference in New Issue
Block a user