another day, another mypy update becomes stricter about typing

Move GlobalState to a runtime T.NamedTuple, use it for constructing the
tuple we are passing around rather than expecting mypy to detect that
the one we already have matches.
0.61
Eli Schwartz 3 years ago committed by Nirbheek Chauhan
parent bdb30bb72b
commit 01c71b691d
  1. 2
      run_project_tests.py

@ -1185,7 +1185,7 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]],
print(f'\nRunning tests with {num_workers} workers') print(f'\nRunning tests with {num_workers} workers')
# Pack the global state # Pack the global state
state = (compile_commands, clean_commands, test_commands, install_commands, uninstall_commands, backend, backend_flags, host_c_compiler) state = GlobalState(compile_commands, clean_commands, test_commands, install_commands, uninstall_commands, backend, backend_flags, host_c_compiler)
executor = ProcessPoolExecutor(max_workers=num_workers) executor = ProcessPoolExecutor(max_workers=num_workers)
futures: T.List[RunFutureUnion] = [] futures: T.List[RunFutureUnion] = []

Loading…
Cancel
Save