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
+4 -1
View File
@@ -1,11 +1,14 @@
import itertools
import sys
import time
import typing
from loop_claude.outcome import Failure, Stop
T = typing.TypeVar("T")
def retried(who, attempt):
def retried(who, attempt: typing.Callable[[], T | Failure]) -> T | Stop:
for failures in itertools.count(1):
result = attempt()
if not isinstance(result, Failure):