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

Function _parse_box_dots

box/box.py:193–200  ·  view source on GitHub ↗

Split a box_dots key at its first "." or "[". Callers only pass keys that contain one.

(bx, item)

Source from the content-addressed store, hash-verified

191
192
193def _parse_box_dots(bx, item):
194 """Split a box_dots key at its first "." or "[". Callers only pass keys that contain one."""
195 for idx, char in enumerate(item):
196 if char == "[":
197 return item[:idx], item[idx:]
198 elif char == ".":
199 return item[:idx], item[idx + 1 :]
200 raise BoxError("Could not split box dots properly")
201
202
203def _get_dot_paths(bx, current=""):

Callers 9

test_dotsMethod · 0.90
_ci_resolveMethod · 0.90
__contains__Method · 0.85
__get_defaultMethod · 0.85
__getitem__Method · 0.85
_comment_ownerMethod · 0.85
__setitem__Method · 0.85
__delitem__Method · 0.85

Calls 1

BoxErrorClass · 0.90

Tested by 2

test_dotsMethod · 0.72