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

Method ensure_loaded

mypy/suggestions.py:712–717  ·  view source on GitHub ↗

Make sure that the module represented by state is fully loaded.

(self, state: State, force: bool = False)

Source from the content-addressed store, hash-verified

710 return self.fgmanager.update([(state.id, state.path)], [])
711
712 def ensure_loaded(self, state: State, force: bool = False) -> MypyFile:
713 """Make sure that the module represented by state is fully loaded."""
714 if not state.tree or state.tree.is_cache_skeleton or force:
715 self.reload(state)
716 assert state.tree is not None
717 return state.tree
718
719 def named_type(self, s: str) -> Instance:
720 return self.manager.semantic_analyzer.named_type(s)

Callers 2

Calls 1

reloadMethod · 0.95

Tested by

no test coverage detected