MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / _merge

Function _merge

scripts/test-impact/profile_text_parser.py:222–234  ·  view source on GitHub ↗
(source, target, start, middle, end, gate)

Source from the content-addressed store, hash-verified

220
221
222def _merge(source, target, start, middle, end, gate):
223 left, right = start, middle
224 for destination in range(start, end):
225 gate.step()
226 take_left = right == end or (
227 left < middle and _compare(source[left], source[right], gate) <= 0
228 )
229 if take_left:
230 target[destination] = source[left]
231 left += 1
232 else:
233 target[destination] = source[right]
234 right += 1
235
236
237def _sorted_unique(records, gate):

Callers 1

_sorted_uniqueFunction · 0.70

Calls 3

rangeFunction · 0.85
_compareFunction · 0.85
stepMethod · 0.45

Tested by

no test coverage detected