default_timeout: Add/update annotations
Change-Id: I56c4f3a8fd49cf6e1129a9dd0eec703855d9304b
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/195045
Commit-Queue: Rob Mohr <mohrr@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
diff --git a/recipe_modules/default_timeout/api.py b/recipe_modules/default_timeout/api.py
index f39d72f..2a9ee4a 100644
--- a/recipe_modules/default_timeout/api.py
+++ b/recipe_modules/default_timeout/api.py
@@ -15,6 +15,7 @@
import contextlib
import dataclasses
+from typing import Generator
from recipe_engine import recipe_api
from RECIPE_MODULES.fuchsia.utils import nice_duration
@@ -24,7 +25,7 @@
"""Ensure the given call completes before swarming kills the build."""
@contextlib.contextmanager
- def __call__(self, buffer_sec: float = 120):
+ def __call__(self, buffer_sec: float = 120) -> Generator[None, None, None]:
current_time_sec: float = self.m.time.time()
# Amount of time elapsed in the run.