MCPcopy Index your code
hub / github.com/python/mypy / wait_for_done

Method wait_for_done

mypy/build.py:1478–1493  ·  view source on GitHub ↗

Wait for a stale SCC processing to finish. Return a tuple three items: * processed SCCs * whether we have more in the queue * new interface hash or list of errors for each module The last item is only used for parallel processing.

(self, graph: Graph)

Source from the content-addressed store, hash-verified

1476 self.add_stats(scc_requests_sent=1, scc_send_time=time.time() - t0)
1477
1478 def wait_for_done(self, graph: Graph) -> tuple[list[SCC], bool, dict[str, ModuleResult]]:
1479 """Wait for a stale SCC processing to finish.
1480
1481 Return a tuple three items:
1482 * processed SCCs
1483 * whether we have more in the queue
1484 * new interface hash or list of errors for each module
1485 The last item is only used for parallel processing.
1486 """
1487 if self.workers:
1488 return self.wait_for_done_workers(graph)
1489 if not self.scc_queue:
1490 return [], False, {}
1491 _, _, next_scc = self.scc_queue.pop(0)
1492 process_stale_scc(graph, next_scc, self)
1493 return [next_scc], bool(self.scc_queue), {}
1494
1495 def wait_for_done_workers(
1496 self, graph: Graph

Callers 1

process_graphFunction · 0.80

Calls 4

wait_for_done_workersMethod · 0.95
process_stale_sccFunction · 0.85
boolClass · 0.85
popMethod · 0.45

Tested by

no test coverage detected