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

Function _parse

scripts/test-impact/profile_map_v2.py:488–507  ·  view source on GitHub ↗
(text, budget, gate, *, enumeration=False)

Source from the content-addressed store, hash-verified

486
487
488def _parse(text, budget, gate, *, enumeration=False):
489 limits = _parser_limits(budget, enumeration)
490 try:
491 records = parse_profile_text(text, limits, cancel=gate.parser_cancel)
492 except MalformedProfileError as error:
493 if error is gate.callback_error:
494 raise
495 if enumeration:
496 raise ProfileMapEnumerationError("invalid profile enumeration") from error
497 return None
498 except LimitExceededError as error:
499 if error is gate.callback_error:
500 raise
501 raise ProfileMapLimitExceededError("profile parser resource limit") from error
502 except ParseCancelledError as error:
503 if error is gate.callback_error:
504 raise
505 raise ProfileMapCancelledError("profile parsing cancelled") from error
506 budget.parsed(records, gate)
507 return records
508
509
510def _record_order(left, right, gate):

Callers 2

_reduce_rowFunction · 0.85
build_profile_map_v2Function · 0.85

Calls 6

parse_profile_textFunction · 0.90
_parser_limitsFunction · 0.85
parsedMethod · 0.80

Tested by

no test coverage detected