From d7d8d6b4d27b3608891ecbee0706962222b6528b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 29 Jul 2016 16:02:48 -0700 Subject: [PATCH] parallel: Add missing annotation. --- zerver/lib/parallel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zerver/lib/parallel.py b/zerver/lib/parallel.py index 3d1f5d2e42..14b32091f5 100644 --- a/zerver/lib/parallel.py +++ b/zerver/lib/parallel.py @@ -12,6 +12,7 @@ def run_parallel(job, data, threads=6): pids = {} # type: Dict[int, Any] def wait_for_one(): + # type: () -> Tuple[int, Any] while True: try: (pid, status) = os.wait() @@ -58,6 +59,7 @@ if __name__ == "__main__": jobs = [10, 19, 18, 6, 14, 12, 8, 2, 1, 13, 3, 17, 9, 11, 5, 16, 7, 15, 4] expected_output = [6, 10, 12, 2, 1, 14, 8, 3, 18, 19, 5, 9, 13, 11, 4, 7, 17, 16, 15] def wait_and_print(x): + # type: (int) -> int time.sleep(x * 0.1) return 0