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

Method set_module

mypyc/irbuild/builder.py:288–295  ·  view source on GitHub ↗

Set the name and path of the current module. This must be called before transforming any AST nodes.

(self, module_name: str, module_path: str)

Source from the content-addressed store, hash-verified

286 # High-level control
287
288 def set_module(self, module_name: str, module_path: str) -> None:
289 """Set the name and path of the current module.
290
291 This must be called before transforming any AST nodes.
292 """
293 self.module_name = module_name
294 self.module_path = module_path
295 self.builder.set_module(module_name, module_path)
296
297 @overload
298 def accept(self, node: Expression, *, can_borrow: bool = False) -> Value: ...

Callers 3

make_builderFunction · 0.95
enterMethod · 0.45
transform_mypy_fileFunction · 0.45

Calls

no outgoing calls

Tested by 1

make_builderFunction · 0.76