MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / _errors_to_tree

Function _errors_to_tree

beanhub_cli/forms/validator.py:40–47  ·  view source on GitHub ↗
(tree: dict, loc: tuple[str, ...], error: dict)

Source from the content-addressed store, hash-verified

38
39
40def _errors_to_tree(tree: dict, loc: tuple[str, ...], error: dict):
41 if not loc:
42 tree.setdefault(CHILDREN_KEY, [])
43 tree[CHILDREN_KEY].append(error)
44 return
45 key = loc[0]
46 subtree = tree.setdefault(key, {})
47 _errors_to_tree(subtree, loc[1:], error)
48
49
50def errors_to_tree(errors: list[dict]) -> dict:

Callers 1

errors_to_treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected