MCPcopy Create free account
hub / github.com/cdgriffith/Box / handle_dicts

Function handle_dicts

box/box.py:206–212  ·  view source on GitHub ↗
(sub_bx, paths="")

Source from the content-addressed store, hash-verified

204 """A generator of all the end node keys in a box in box_dots format"""
205
206 def handle_dicts(sub_bx, paths=""):
207 for key, value in sub_bx.items():
208 yield f"{paths}.{key}" if paths else key
209 if isinstance(value, dict):
210 yield from handle_dicts(value, f"{paths}.{key}" if paths else key)
211 elif isinstance(value, list):
212 yield from handle_lists(value, f"{paths}.{key}" if paths else key)
213
214 def handle_lists(bx_list, paths=""):
215 for i, value in enumerate(bx_list):

Callers 2

handle_listsFunction · 0.85
_get_dot_pathsFunction · 0.85

Calls 2

handle_listsFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected