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

Method serialize

mypy/types.py:704–716  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

702 )
703
704 def serialize(self) -> JsonDict:
705 assert not self.id.is_meta_var()
706 return {
707 ".class": "TypeVarType",
708 "name": self.name,
709 "fullname": self.fullname,
710 "id": self.id.raw_id,
711 "namespace": self.id.namespace,
712 "values": [v.serialize() for v in self.values],
713 "upper_bound": self.upper_bound.serialize(),
714 "default": self.default.serialize(),
715 "variance": self.variance,
716 }
717
718 @classmethod
719 def deserialize(cls, data: JsonDict) -> TypeVarType:

Callers

nothing calls this directly

Calls 2

is_meta_varMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected