Answer principles round 1: 1 🔴, 7 🟡 (0 misread); every effect is handed in as an argument, no test patches a global, and the traces principle scopes tools that run on their user's machine
CI / tests (pull_request) Successful in 3m43s

This commit is contained in:
2026-11-19 12:42:03 +01:00
parent 8ca612b7a4
commit cb3135bc8c
124 changed files with 1437 additions and 793 deletions
+5 -3
View File
@@ -94,6 +94,7 @@ from plan_store.plans import no_item, PlanStore, TAGLINE, Written
from plan.release import parsed, Release, version as release_version
from plan_store.stores import store as plan_store
from plan.touches import predicted
from project_config.settings import ProjectConfig
from record_store.stores import RecordStore, store
from todo_item.table import shown, table
from todo_item.edits import with_bullet
@@ -104,16 +105,17 @@ LETTERS = ("L", "E", "I", "S")
NAMED = {"release": "Release", "blocked_by": BLOCKED_BY, "exempt": "Exempt", "tagline": TAGLINE, "moves": MOVES}
def main(argv: list[str], folder: pathlib.Path = pathlib.Path(), stdin: typing.TextIO = sys.stdin) -> int:
# plan_of is plan_store, but in the tests of a plan in Jira, which hand it a plan in memory.
def main(argv: list[str], folder: pathlib.Path, home: pathlib.Path, stdin: typing.TextIO, plan_of: typing.Callable[[ProjectConfig], PlanStore] = plan_store) -> int:
if argv[:1] in (["-h"], ["--help"]):
print(__doc__.strip())
return 0
args = parser().parse_args(argv)
config = located(str(folder), pathlib.Path.home())
config = located(str(folder), home)
if isinstance(config, Failure):
done: str | Failure = config
else:
plan = plan_store(config)
plan = plan_of(config)
match args.command:
case "list":
done = list_(args, plan)