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

Method final_definition

mypyc/codegen/emitmodule.py:1547–1551  ·  view source on GitHub ↗
(self, module: str, name: str, typ: RType, emitter: Emitter)

Source from the content-addressed store, hash-verified

1545 )
1546
1547 def final_definition(self, module: str, name: str, typ: RType, emitter: Emitter) -> str:
1548 static_name = emitter.static_name(name, module)
1549 # Here we rely on the fact that undefined value and error value are always the same
1550 undefined = emitter.c_initializer_undefined_value(typ)
1551 return f"{emitter.ctype_spaced(typ)}{static_name} = {undefined};"
1552
1553 def declare_static_pyobject(self, identifier: str, emitter: Emitter) -> None:
1554 symbol = emitter.static_name(identifier, None)

Callers 1

declare_finalsMethod · 0.95

Calls 3

static_nameMethod · 0.80
ctype_spacedMethod · 0.80

Tested by

no test coverage detected