MCPcopy
hub / github.com/python/mypy / process_fresh_modules

Function process_fresh_modules

mypy/build.py:4692–4705  ·  view source on GitHub ↗

Process the modules in one group of modules from their cached data. This can be used to process an SCC of modules. This involves loading the tree (i.e. module symbol tables) from cache file and then fixing cross-references in the symbols.

(graph: Graph, modules: list[str], manager: BuildManager)

Source from the content-addressed store, hash-verified

4690
4691
4692def process_fresh_modules(graph: Graph, modules: list[str], manager: BuildManager) -> None:
4693 """Process the modules in one group of modules from their cached data.
4694
4695 This can be used to process an SCC of modules. This involves loading the tree (i.e.
4696 module symbol tables) from cache file and then fixing cross-references in the symbols.
4697 """
4698 t0 = time.time()
4699 for id in modules:
4700 graph[id].load_tree()
4701 t1 = time.time()
4702 for id in modules:
4703 graph[id].fix_cross_refs()
4704 t2 = time.time()
4705 manager.add_stats(process_fresh_time=t2 - t0, load_tree_time=t1 - t0)
4706
4707
4708def maybe_load_deps(graph: Graph, ascc: SCC, manager: BuildManager) -> None:

Callers 2

ensure_trees_loadedFunction · 0.90
maybe_load_depsFunction · 0.85

Calls 3

load_treeMethod · 0.80
fix_cross_refsMethod · 0.80
add_statsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…