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
+2 -2
View File
@@ -66,7 +66,7 @@ def main(argv: list[str]) -> int:
print("usage: touch-predictions record <ID>...", file=sys.stderr)
return 1
config = project()
done = config if isinstance(config, Failure) else recorded(config, sorted({int(id_) for id_ in argv[1:]}))
done = config if isinstance(config, Failure) else recorded(config, sorted({int(id_) for id_ in argv[1:]}), time.time, git)
if isinstance(done, Failure):
print(f"touch-predictions: {done.reason}", file=sys.stderr)
return 1
@@ -74,7 +74,7 @@ def main(argv: list[str]) -> int:
return 0
def recorded(config: ProjectConfig, ids: list[int], now: typing.Callable[[], float] = time.time, run: Git = git) -> str | Failure:
def recorded(config: ProjectConfig, ids: list[int], now: typing.Callable[[], float], run: Git) -> str | Failure:
"""Appends the entry of the chunk that takes the items ids, stamped at now and read from the commits run shows, and says so; or says that the project keeps no record."""
store = touch_predictions_store(config)
if store is None: