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

Function restore

mypy/server/update.py:602–614  ·  view source on GitHub ↗
(ids: list[str])

Source from the content-addressed store, hash-verified

600 orig_tree = manager.modules.get(module)
601
602 def restore(ids: list[str]) -> None:
603 # For each of the modules in ids, restore that id's old
604 # manager.modules and graphs entries. (Except for the original
605 # module, this means deleting them.)
606 for id in ids:
607 if id == orig_module and orig_tree:
608 manager.modules[id] = orig_tree
609 elif id in manager.modules:
610 del manager.modules[id]
611 if id == orig_module and orig_state:
612 graph[id] = orig_state
613 elif id in graph:
614 del graph[id]
615
616 new_modules: list[State] = []
617 try:

Callers 1

update_module_isolatedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…