Annotate the return type of every function in loop_claude
This commit is contained in:
@@ -5,7 +5,7 @@ from loop_claude.claude_code.transcript import part_line
|
||||
from loop_claude.outcome import Failure
|
||||
|
||||
|
||||
def run_worker(root, args):
|
||||
def run_worker(root, args) -> Failure | None:
|
||||
try:
|
||||
proc = subprocess.Popen(["claude", *args], cwd=root, encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL, stdout=subprocess.PIPE)
|
||||
except OSError as failure:
|
||||
@@ -26,7 +26,7 @@ def run_worker(root, args):
|
||||
return None if done else Failure("claude exited 0 without a result event")
|
||||
|
||||
|
||||
def worker_args(task, session, model, resuming):
|
||||
def worker_args(task, session, model, resuming) -> list[str]:
|
||||
if resuming:
|
||||
start = ["-p", "Continue the task; the previous run stopped before it was finished.", "--resume", str(session.id)]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user