MCPcopy Create free account
hub / github.com/Qinbf/groundmap / make_unique

Function make_unique

scripts/postprocess.py:103–112  ·  view source on GitHub ↗
(base: str)

Source from the content-addressed store, hash-verified

101 used: set[str] = set()
102
103 def make_unique(base: str) -> str:
104 if base not in used:
105 used.add(base)
106 return base
107 for k in range(2, 1000):
108 cand = f"{base}-{k}"
109 if cand not in used:
110 used.add(cand)
111 return cand
112 return base + "-x"
113
114 for blk in blocks:
115 if blk.kind == "hr":

Callers 1

add_anchorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected