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

Method deserialize

mypy/nodes.py:882–901  ·  view source on GitHub ↗
(cls, data: JsonDict)

Source from the content-addressed store, hash-verified

880
881 @classmethod
882 def deserialize(cls, data: JsonDict) -> OverloadedFuncDef:
883 assert data[".class"] == "OverloadedFuncDef"
884 res = OverloadedFuncDef(
885 [cast(OverloadPart, SymbolNode.deserialize(d)) for d in data["items"]]
886 )
887 if data.get("impl") is not None:
888 res.impl = cast(OverloadPart, SymbolNode.deserialize(data["impl"]))
889 # set line for empty overload items, as not set in __init__
890 if len(res.items) > 0:
891 res.set_line(res.impl.line)
892 if data.get("type") is not None:
893 typ = mypy.types.deserialize_type(data["type"])
894 assert isinstance(typ, mypy.types.ProperType)
895 res.type = typ
896 res._fullname = data["fullname"]
897 set_flags(res, data["flags"])
898 res.deprecated = data["deprecated"]
899 res.setter_index = data["setter_index"]
900 # NOTE: res.info will be set in the fixup phase.
901 return res
902
903 def write(self, data: WriteBuffer) -> None:
904 write_tag(data, OVERLOADED_FUNC_DEF)

Callers

nothing calls this directly

Calls 7

OverloadedFuncDefClass · 0.85
lenFunction · 0.85
isinstanceFunction · 0.85
set_flagsFunction · 0.85
deserializeMethod · 0.45
getMethod · 0.45
set_lineMethod · 0.45

Tested by

no test coverage detected