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

Method serialize

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

Source from the content-addressed store, hash-verified

857 return self.id == other.id and self.flavor == other.flavor and self.prefix == other.prefix
858
859 def serialize(self) -> JsonDict:
860 assert not self.id.is_meta_var()
861 return {
862 ".class": "ParamSpecType",
863 "name": self.name,
864 "fullname": self.fullname,
865 "id": self.id.raw_id,
866 "namespace": self.id.namespace,
867 "flavor": self.flavor,
868 "upper_bound": self.upper_bound.serialize(),
869 "default": self.default.serialize(),
870 "prefix": self.prefix.serialize(),
871 }
872
873 @classmethod
874 def deserialize(cls, data: JsonDict) -> ParamSpecType:

Callers

nothing calls this directly

Calls 2

is_meta_varMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected