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

Function deserialize_type

mypy/types.py:242–249  ·  view source on GitHub ↗
(data: JsonDict | str)

Source from the content-addressed store, hash-verified

240
241
242def deserialize_type(data: JsonDict | str) -> Type:
243 if isinstance(data, str):
244 return Instance.deserialize(data)
245 classname = data[".class"]
246 method = deserialize_map.get(classname)
247 if method is not None:
248 return method(data)
249 raise NotImplementedError(f"unexpected .class {classname}")
250
251
252class Type(mypy.nodes.Context):

Callers 15

deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70
deserializeMethod · 0.70

Calls 4

isinstanceFunction · 0.85
NotImplementedErrorClass · 0.85
deserializeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…