MCPcopy Create free account
hub / github.com/dot-agent/nextpy / serialize_mutable_proxy

Function serialize_mutable_proxy

nextpy/backend/state.py:2092–2107  ·  view source on GitHub ↗

Serialize the wrapped value of a MutableProxy. Args: mp: The MutableProxy to serialize. Returns: The serialized wrapped object. Raises: ValueError: when the wrapped object is not serializable.

(mp: MutableProxy)

Source from the content-addressed store, hash-verified

2090
2091@serializer
2092def serialize_mutable_proxy(mp: MutableProxy) -> SerializedType:
2093 """Serialize the wrapped value of a MutableProxy.
2094
2095 Args:
2096 mp: The MutableProxy to serialize.
2097
2098 Returns:
2099 The serialized wrapped object.
2100
2101 Raises:
2102 ValueError: when the wrapped object is not serializable.
2103 """
2104 value = serialize(mp.__wrapped__)
2105 if value is None:
2106 raise ValueError(f"Cannot serialize {type(mp.__wrapped__)}")
2107 return value
2108
2109
2110class ImmutableMutableProxy(MutableProxy):

Callers

nothing calls this directly

Calls 1

serializeFunction · 0.90

Tested by

no test coverage detected