MCPcopy
hub / github.com/Open-Wine-Components/umu-launcher / dumps

Function dumps

umu/vdf/__init__.py:248–257  ·  view source on GitHub ↗

Serialize ``obj`` to a VDF formatted ``str``.

(obj, pretty=False, escaped=True)

Source from the content-addressed store, hash-verified

246
247
248def dumps(obj, pretty=False, escaped=True):
249 """Serialize ``obj`` to a VDF formatted ``str``."""
250 if not isinstance(obj, Mapping):
251 raise TypeError("Expected data to be an instance of``dict``")
252 if not isinstance(pretty, bool):
253 raise TypeError("Expected pretty to be of type bool")
254 if not isinstance(escaped, bool):
255 raise TypeError("Expected escaped to be of type bool")
256
257 return "".join(_dump_gen(obj, pretty, escaped))
258
259
260def dump(obj, fp, pretty=False, escaped=True):

Callers 5

_get_deltaFunction · 0.85
test_get_delta_cborMethod · 0.85

Calls 1

_dump_genFunction · 0.85

Tested by 4

test_get_delta_cborMethod · 0.68