From ff6b286bf8dd86d2840aa8a53c5172b67fa510a1 Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Mon, 16 Dec 2024 19:32:36 +0000 Subject: [PATCH] Fix type annotations --- Lib/test/libregrtest/parallel_case.py | 2 +- Lib/test/libregrtest/single.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/libregrtest/parallel_case.py b/Lib/test/libregrtest/parallel_case.py index 0c15fa78b63f78..7c06da59b94404 100644 --- a/Lib/test/libregrtest/parallel_case.py +++ b/Lib/test/libregrtest/parallel_case.py @@ -18,7 +18,7 @@ def __init__(self, test_case: TestCase, num_threads: int): def __str__(self): return f"{str(self.test_case)} [threads={self.num_threads}]" - def run_worker(self, test_case: TestCase, result: unittest.Result, + def run_worker(self, test_case: TestCase, result: unittest.TestResult, barrier: threading.Barrier): barrier.wait() test_case.run(result) diff --git a/Lib/test/libregrtest/single.py b/Lib/test/libregrtest/single.py index c0ebe0c708831e..132db3960d621f 100644 --- a/Lib/test/libregrtest/single.py +++ b/Lib/test/libregrtest/single.py @@ -60,7 +60,7 @@ def is_thread_unsafe(test): return (getattr(test_method, "__unittest_thread_unsafe__", False) or getattr(instance, "__unittest_thread_unsafe__", False)) - newtests = [] + newtests: list[object] = [] for test in suite._tests: if isinstance(test, unittest.TestSuite): _parallelize_tests(test, parallel_threads)