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

Method add_attr

mypyc/irbuild/classdef.py:282–286  ·  view source on GitHub ↗
(self, lvalue: NameExpr, stmt: AssignmentStmt)

Source from the content-addressed store, hash-verified

280 handle_non_ext_method(self.builder, self.non_ext, self.cdef, fdef)
281
282 def add_attr(self, lvalue: NameExpr, stmt: AssignmentStmt) -> None:
283 add_non_ext_class_attr_ann(self.builder, self.non_ext, lvalue, stmt)
284 add_non_ext_class_attr(
285 self.builder, self.non_ext, lvalue, stmt, self.cdef, self.attrs_to_cache
286 )
287
288 def finalize(self, ir: ClassIR) -> None:
289 # Dynamically create the class via the type constructor

Callers 1

transform_class_defFunction · 0.95

Calls 2

add_non_ext_class_attrFunction · 0.85

Tested by

no test coverage detected