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

Method __init__

mypy/server/update.py:172–206  ·  view source on GitHub ↗

Initialize fine-grained build based on a batch build. Args: result: Result from the initialized build. The manager and graph will be taken over by this class. manager: State of the build (mutated by this class) graph: Additional state

(self, result: BuildResult)

Source from the content-addressed store, hash-verified

170
171class FineGrainedBuildManager:
172 def __init__(self, result: BuildResult) -> None:
173 """Initialize fine-grained build based on a batch build.
174
175 Args:
176 result: Result from the initialized build.
177 The manager and graph will be taken over by this class.
178 manager: State of the build (mutated by this class)
179 graph: Additional state of the build (mutated by this class)
180 """
181 manager = result.manager
182 self.manager = manager
183 self.graph = result.graph
184 self.previous_modules = get_module_to_path_map(self.graph)
185 self.deps = manager.fg_deps
186 # Merge in any root dependencies that may not have been loaded
187 merge_dependencies(manager.load_fine_grained_deps(FAKE_ROOT_MODULE), self.deps)
188 self.previous_targets_with_errors = manager.errors.targets()
189 self.previous_messages: list[str] = result.errors.copy()
190 # Module, if any, that had blocking errors in the last run as (id, path) tuple.
191 self.blocking_error: tuple[str, str] | None = None
192 # Module that we haven't processed yet but that are known to be stale.
193 self.stale: list[tuple[str, str]] = []
194 # Disable the cache so that load_graph doesn't try going back to disk
195 # for the cache.
196 self.manager.cache_enabled = False
197
198 # Some hints to the test suite about what is going on:
199 # Active triggers during the last update
200 self.triggered: list[str] = []
201 # Modules passed to update during the last update
202 self.changed_modules: list[tuple[str, str]] = []
203 # Modules processed during the last update
204 self.updated_modules: list[str] = []
205 # Targets processed during last update (for testing only).
206 self.processed_targets: list[str] = []
207
208 def update(
209 self,

Callers

nothing calls this directly

Calls 5

merge_dependenciesFunction · 0.90
get_module_to_path_mapFunction · 0.85
targetsMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected