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

Function build_patch_dict

scripts/update_lib/patch_spec.py:230–235  ·  view source on GitHub ↗
(it: "Iterator[PatchEntry]")

Source from the content-addressed store, hash-verified

228
229
230def build_patch_dict(it: "Iterator[PatchEntry]") -> Patches:
231 patches = collections.defaultdict(lambda: collections.defaultdict(list))
232 for entry in it:
233 patches[entry.parent_class][entry.test_name].append(entry.spec)
234
235 return {k: dict(v) for k, v in patches.items()}
236
237
238def extract_patches(contents: str) -> Patches:

Callers 1

extract_patchesFunction · 0.85

Calls 2

appendMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected