MCPcopy
hub / github.com/marshmallow-code/marshmallow / _deserialize

Method _deserialize

tests/test_context.py:38–42  ·  view source on GitHub ↗
(self, value, attr, data, **kwargs)

Source from the content-addressed store, hash-verified

36 return super()._serialize(value, attr, obj, **kwargs)
37
38 def _deserialize(self, value, attr, data, **kwargs):
39 val = super()._deserialize(value, attr, data, **kwargs)
40 if (context := Context[dict].get(None)) is not None:
41 val *= context.get("factor", 1)
42 return val
43
44 class ContextSchema(Schema):
45 ctx_fld = ContextField()

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected