Answer the audit: Limited in its own module, the retry time's zone injected, file items 37 and 38

This commit is contained in:
2026-10-02 23:05:17 +02:00
parent a5e6e92f22
commit 8e8503345b
9 changed files with 46 additions and 17 deletions
+2
View File
@@ -21,6 +21,7 @@ class Effects:
execv: typing.Callable[[str, list[str]], None]
git: typing.Callable[[list[str], str], subprocess.CompletedProcess[str]]
input: typing.Callable[[str], str]
local_time: typing.Callable[[float], str]
now: typing.Callable[[], float]
on_terminal: typing.Callable[[], bool]
python: typing.Callable[[list[str]], subprocess.CompletedProcess[str]]
@@ -47,6 +48,7 @@ def system_effects() -> Effects:
execv=os.execv,
git=lambda args, cwd: subprocess.run(["git", *args], capture_output=True, cwd=cwd, text=True),
input=input,
local_time=lambda seconds: time.strftime("%Y-%m-%d %H:%M %Z", time.localtime(seconds)),
now=time.time,
on_terminal=lambda: sys.stdin.isatty() and sys.stdout.isatty(),
python=lambda args: subprocess.run([sys.executable, *args], capture_output=True, text=True),