Annotate the return type of every function in loop_claude

This commit is contained in:
2026-09-29 12:23:37 +02:00
parent 0842135b87
commit d13658967a
20 changed files with 62 additions and 58 deletions
+2 -2
View File
@@ -3,11 +3,11 @@ import sys
from loop_claude.outcome import Stop
def stop(to, but):
def stop(to, but) -> Stop:
return Stop(2, f"the human is needed to {to}, but {but}")
def off_terminal(to):
def off_terminal(to) -> Stop | None:
if sys.stdin.isatty() and sys.stdout.isatty():
return None
return stop(to, "stdin or stdout is not a terminal; rerun loop-claude on a terminal")