Answer prose round 1: 0 🔴, 4 🟡 (0 misread); reword the time comments, the docstring and the changelog sentence
This commit is contained in:
@@ -37,7 +37,7 @@ class Effects:
|
||||
execv: typing.Callable[[str, list[str]], None]
|
||||
git: Git
|
||||
input: typing.Callable[[str], str]
|
||||
# A time of day in the machine's zone, as `2026-10-28 11:46:01`. The spelling, and local time over UTC, is lilleman's call of 2026-10-28.
|
||||
# A date and time in the machine's zone, as `2026-10-28 11:46:01`. lilleman chose this spelling and local time over UTC on 2026-10-28, since the human reads these on their own clock.
|
||||
local_time: typing.Callable[[float], str]
|
||||
# The machine's memory; None where it cannot be read.
|
||||
memory: typing.Callable[[], Memory | None]
|
||||
@@ -91,7 +91,7 @@ def run_python(args: list[str], cwd: str, timeout: float) -> subprocess.Complete
|
||||
|
||||
|
||||
def say(text: str, effects: Effects, *, stdout: bool = False) -> None:
|
||||
"""Prints text on stderr, or on stdout where stdout, opening its first line with the machine's local time, so the human sees when it happened. Blank lines before the text stay blank, and only its first line gets the time."""
|
||||
"""Prints text on stderr, or on stdout where stdout, opening the first line of words with the machine's local time. Blank lines before those words stay blank, and later lines get no time."""
|
||||
body = text.lstrip("\n")
|
||||
blanks = text[: len(text) - len(body)]
|
||||
print(f"{blanks}{effects.local_time(effects.now())} {body}", file=sys.stdout if stdout else sys.stderr, flush=True)
|
||||
|
||||
Reference in New Issue
Block a user