@@ -295,7 +295,9 @@ def run_test(
295295 namespace = dict (locals ())
296296 tracer .runctx (cmd , globals = globals (), locals = namespace )
297297 result = namespace ['result' ]
298- result .covered_lines = list (tracer .counts )
298+ # Mypy doesn't know about this attribute yet,
299+ # but it will do soon: https://github.com/python/typeshed/pull/11091
300+ result .covered_lines = list (tracer .counts ) # type: ignore[attr-defined]
299301 else :
300302 result = run_single_test (test_name , runtests )
301303
@@ -371,7 +373,8 @@ def finalize_tests(self, coverage: trace.CoverageResults | None) -> None:
371373 os .unlink (self .next_single_filename )
372374
373375 if coverage is not None :
374- coverage .write_results (show_missing = True , summary = True ,
376+ # uses a new-in-Python 3.13 keyword argument that mypy doesn't know about yet:
377+ coverage .write_results (show_missing = True , summary = True , # type: ignore[call-arg]
375378 coverdir = self .coverage_dir ,
376379 ignore_missing_files = True )
377380
@@ -432,7 +435,10 @@ def _run_tests(self, selected: TestTuple, tests: TestList | None) -> int:
432435 if self .num_workers < 0 :
433436 # Use all CPUs + 2 extra worker processes for tests
434437 # that like to sleep
435- self .num_workers = (os .process_cpu_count () or 1 ) + 2
438+ #
439+ # os.process.cpu_count() is new in Python 3.13;
440+ # mypy doesn't know about it yet
441+ self .num_workers = (os .process_cpu_count () or 1 ) + 2 # type: ignore[attr-defined]
436442
437443 # For a partial run, we do not need to clutter the output.
438444 if (self .want_header
0 commit comments