From 80a4826f49a1f9a7d300d625553c63c3d7926c6f Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 29 Jul 2016 20:13:08 -0700 Subject: [PATCH] Annotate zephyr_mirror.py. --- bots/zephyr_mirror.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 165badc..38275b5 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -34,9 +34,13 @@ from .zephyr_mirror_backend import parse_args (options, args) = parse_args() sys.path[:0] = [os.path.join(options.root_path, 'api')] + +from types import FrameType from typing import Any def die(signal, frame): + # type: (int, FrameType) -> None + # We actually want to exit, so run os._exit (so as not to be caught and restarted) os._exit(1) @@ -59,6 +63,7 @@ if options.forward_class_messages and not options.noshard: print("Starting parallel zephyr class mirroring bot") jobs = list("0123456789abcdef") def run_job(shard): + # type: (str) -> int subprocess.call(args + ["--shard=%s" % (shard,)]) return 0 for (status, job) in run_parallel(run_job, jobs, threads=16):