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

Function _encode_var

nextpy/backend/vars.py:178–189  ·  view source on GitHub ↗

Encode the state name into a formatted var. Args: value: The value to encode the state name into. Returns: The encoded var.

(value: Var)

Source from the content-addressed store, hash-verified

176
177
178def _encode_var(value: Var) -> str:
179 """Encode the state name into a formatted var.
180
181 Args:
182 value: The value to encode the state name into.
183
184 Returns:
185 The encoded var.
186 """
187 if value._var_data:
188 return f"<nextpy.Var>{value._var_data.json()}</nextpy.Var>" + str(value)
189 return str(value)
190
191
192def _decode_var(value: str) -> tuple[VarData | None, str]:

Callers 1

__format__Method · 0.85

Calls 1

jsonMethod · 0.80

Tested by

no test coverage detected