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

Method deserialize

mypy/types.py:439–448  ·  view source on GitHub ↗
(cls, data: JsonDict)

Source from the content-addressed store, hash-verified

437
438 @classmethod
439 def deserialize(cls, data: JsonDict) -> TypeAliasType:
440 assert data[".class"] == "TypeAliasType"
441 args: list[Type] = []
442 if "args" in data:
443 args_list = data["args"]
444 assert isinstance(args_list, list)
445 args = [deserialize_type(arg) for arg in args_list]
446 alias = TypeAliasType(None, args)
447 alias.type_ref = data["type_ref"]
448 return alias
449
450 def write(self, data: WriteBuffer) -> None:
451 write_tag(data, TYPE_ALIAS_TYPE)

Callers

nothing calls this directly

Calls 3

isinstanceFunction · 0.85
TypeAliasTypeClass · 0.85
deserialize_typeFunction · 0.70

Tested by

no test coverage detected