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

Function patches_from_json

scripts/update_lib/patch_spec.py:386–397  ·  view source on GitHub ↗

Convert JSON dict back to Patches.

(data: dict)

Source from the content-addressed store, hash-verified

384
385
386def patches_from_json(data: dict) -> Patches:
387 """Convert JSON dict back to Patches."""
388 return {
389 cls_name: {
390 test_name: [
391 PatchSpec(**spec)._replace(ut_method=UtMethod(spec["ut_method"]))
392 for spec in specs
393 ]
394 for test_name, specs in tests.items()
395 }
396 for cls_name, tests in data.items()
397 }

Callers 1

mainFunction · 0.90

Calls 3

PatchSpecClass · 0.85
UtMethodClass · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected