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

Method get_method

mypyc/ir/class_ir.py:336–338  ·  view source on GitHub ↗
(self, name: str, *, prefer_method: bool = False)

Source from the content-addressed store, hash-verified

334 return None
335
336 def get_method(self, name: str, *, prefer_method: bool = False) -> FuncIR | None:
337 res = self.get_method_and_class(name, prefer_method=prefer_method)
338 return res[0] if res else None
339
340 def has_method_decl(self, name: str) -> bool:
341 return any(name in ir.method_decls for ir in self.mro)

Callers 15

compute_vtableFunction · 0.45
specialize_parent_vtableFunction · 0.45
assignMethod · 0.45
gen_glue_ne_methodFunction · 0.45
add_coroutine_propertiesFunction · 0.45
visit_get_attrMethod · 0.45
visit_set_attrMethod · 0.45
generate_bin_op_wrapperFunction · 0.45
dunder_attr_slotFunction · 0.45
generate_classFunction · 0.45

Calls 1

get_method_and_classMethod · 0.95

Tested by

no test coverage detected