MCPcopy
hub / github.com/pydantic/pydantic / deserialize

Method deserialize

pydantic/mypy.py:417–421  ·  view source on GitHub ↗

Based on mypy.plugins.dataclasses.DataclassAttribute.deserialize.

(cls, info: TypeInfo, data: JsonDict, api: SemanticAnalyzerPluginInterface)

Source from the content-addressed store, hash-verified

415
416 @classmethod
417 def deserialize(cls, info: TypeInfo, data: JsonDict, api: SemanticAnalyzerPluginInterface) -> PydanticModelField:
418 """Based on mypy.plugins.dataclasses.DataclassAttribute.deserialize."""
419 data = data.copy()
420 typ = deserialize_and_fixup_type(data.pop('type'), api)
421 return cls(type=typ, info=info, **data)
422
423 def expand_typevar_from_subtype(self, sub_type: TypeInfo, api: SemanticAnalyzerPluginInterface) -> None:
424 """Expands type vars in the context of a subtype when an attribute is inherited

Callers 1

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected