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

Function format_loc

beanhub_cli/forms/validator.py:14–23  ·  view source on GitHub ↗
(loc: tuple[str, ...])

Source from the content-addressed store, hash-verified

12
13
14def format_loc(loc: tuple[str, ...]) -> str:
15 parts: list[str] = []
16 for item in loc:
17 if isinstance(item, int):
18 parts.append(f"[{item}]")
19 else:
20 if parts:
21 parts.append(".")
22 parts.append(item)
23 return "".join(parts)
24
25
26def merge_index_loc(loc: tuple[str, ...]) -> tuple[str, ...]:

Callers 1

test_format_locFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_format_locFunction · 0.72