MCPcopy Create free account
hub / github.com/python/mypy / translate_module_id

Method translate_module_id

mypy/fastparse.py:872–876  ·  view source on GitHub ↗

Return the actual, internal module id for a source text id.

(self, id: str)

Source from the content-addressed store, hash-verified

870 return self._is_stripped_if_stmt(stmt.else_body.body[0])
871
872 def translate_module_id(self, id: str) -> str:
873 """Return the actual, internal module id for a source text id."""
874 if id == self.options.custom_typing_module:
875 return "typing"
876 return id
877
878 def visit_Module(self, mod: ast3.Module) -> MypyFile:
879 self.type_ignores = {}

Callers 2

visit_ImportMethod · 0.95
visit_ImportFromMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected