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

Method get_id_from_json

mypyc/ir/func_ir.py:235–240  ·  view source on GitHub ↗

Get the id from the serialized FuncIR associated with this FuncDecl

(func_ir: JsonDict)

Source from the content-addressed store, hash-verified

233 # TODO: move this to FuncIR?
234 @staticmethod
235 def get_id_from_json(func_ir: JsonDict) -> str:
236 """Get the id from the serialized FuncIR associated with this FuncDecl"""
237 decl = func_ir["decl"]
238 shortname = FuncDecl.compute_shortname(decl["class_name"], decl["name"])
239 fullname = decl["module_name"] + "." + shortname
240 return get_id_from_name(decl["name"], fullname, func_ir["line"])
241
242 @classmethod
243 def deserialize(cls, data: JsonDict, ctx: DeserMaps) -> FuncDecl:

Callers 1

deserializeMethod · 0.80

Calls 2

get_id_from_nameFunction · 0.90
compute_shortnameMethod · 0.80

Tested by

no test coverage detected