MCPcopy Index your code
hub / github.com/RustPython/RustPython / patches_to_json

Function patches_to_json

scripts/update_lib/patch_spec.py:375–383  ·  view source on GitHub ↗

Convert patches to JSON-serializable dict.

(patches: Patches)

Source from the content-addressed store, hash-verified

373
374
375def patches_to_json(patches: Patches) -> dict:
376 """Convert patches to JSON-serializable dict."""
377 return {
378 cls_name: {
379 test_name: [spec._asdict() for spec in specs]
380 for test_name, specs in tests.items()
381 }
382 for cls_name, tests in patches.items()
383 }
384
385
386def patches_from_json(data: dict) -> Patches:

Callers 1

mainFunction · 0.90

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected