Annotate the return type of every function in loop_claude
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user