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

Method __init__

mypyc/ir/module_ir.py:16–35  ·  view source on GitHub ↗
(
        self,
        fullname: str,
        imports: list[str],
        functions: list[FuncIR],
        classes: list[ClassIR],
        final_names: list[tuple[str, RType]],
        type_var_names: list[str],
    )

Source from the content-addressed store, hash-verified

14 """Intermediate representation of a module."""
15
16 def __init__(
17 self,
18 fullname: str,
19 imports: list[str],
20 functions: list[FuncIR],
21 classes: list[ClassIR],
22 final_names: list[tuple[str, RType]],
23 type_var_names: list[str],
24 ) -> None:
25 self.fullname = fullname
26 self.imports = imports.copy()
27 self.functions = functions
28 self.classes = classes
29 self.final_names = final_names
30 # Names of C statics used for Python 3.12 type variable objects.
31 # These are only visible in the module that defined them, so no need
32 # to serialize.
33 self.type_var_names = type_var_names
34 # Dependencies needed by the module (such as capsules or source files)
35 self.dependencies: set[Dependency] = set()
36
37 def serialize(self) -> JsonDict:
38 # Serialize dependencies as a list of dicts with type information

Callers

nothing calls this directly

Calls 2

setClass · 0.85
copyMethod · 0.45

Tested by

no test coverage detected