MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / write

Function write

app/update/result.py:46–53  ·  view source on GitHub ↗

Serializes a Result object to a file as JSON. Args: result: A Result object containing results of an update job. result_file: File handle to which to serialize the result object.

(result, result_file)

Source from the content-addressed store, hash-verified

44
45
46def write(result, result_file):
47 """Serializes a Result object to a file as JSON.
48
49 Args:
50 result: A Result object containing results of an update job.
51 result_file: File handle to which to serialize the result object.
52 """
53 json.dump(dataclasses.asdict(result), result_file, cls=_ResultEncoder)
54
55
56class _ResultEncoder(json.JSONEncoder):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected