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

Function add_all_sources_to_changed

mypy/dmypy_server.py:1057–1070  ·  view source on GitHub ↗

Add all (explicit) sources to the list changed files in place. Use this when re-processing of unchanged files is needed (e.g. for the purpose of exporting types for inspections).

(sources: list[BuildSource], changed: list[tuple[str, str]])

Source from the content-addressed store, hash-verified

1055
1056
1057def add_all_sources_to_changed(sources: list[BuildSource], changed: list[tuple[str, str]]) -> None:
1058 """Add all (explicit) sources to the list changed files in place.
1059
1060 Use this when re-processing of unchanged files is needed (e.g. for
1061 the purpose of exporting types for inspections).
1062 """
1063 changed_set = set(changed)
1064 changed.extend(
1065 [
1066 (bs.module, bs.path)
1067 for bs in sources
1068 if bs.path and (bs.module, bs.path) not in changed_set
1069 ]
1070 )
1071
1072
1073def fix_module_deps(graph: mypy.build.Graph) -> None:

Calls 2

setClass · 0.85
extendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…