MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / load_json_requests

Function load_json_requests

tests/miocodec/miocodec_python_warm_bench.py:59–70  ·  view source on GitHub ↗
(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

57
58
59def load_json_requests(args: argparse.Namespace) -> list[dict[str, Any]]:
60 if args.request_sequence_json:
61 payload = json.loads(args.request_sequence_json)
62 if not isinstance(payload, list):
63 raise RuntimeError("--request-sequence-json must decode to a list")
64 return payload
65 if args.request_json:
66 payload = json.loads(args.request_json)
67 if not isinstance(payload, dict):
68 raise RuntimeError("--request-json must decode to an object")
69 return [payload]
70 return []
71
72
73def require_request_path(request: dict[str, Any], key: str) -> Path:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected