MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / parse_ids

Function parse_ids

generation/pipeline/cli.py:37–44  ·  view source on GitHub ↗

Parse a comma-separated ID list string into a list of integers.

(ids_str: Optional[str])

Source from the content-addressed store, hash-verified

35
36
37def parse_ids(ids_str: Optional[str]) -> Optional[list[int]]:
38 """Parse a comma-separated ID list string into a list of integers."""
39 if not ids_str:
40 return None
41 try:
42 return [int(x.strip()) for x in ids_str.split(",")]
43 except ValueError:
44 raise ValueError(f"Invalid ID list format: {ids_str}")
45
46
47def add_llm_args(parser: argparse.ArgumentParser, prefix: str = "") -> None:

Callers 5

cmd_generate_personasFunction · 0.85
cmd_generate_eventsFunction · 0.85
cmd_generate_trap_eventsFunction · 0.85
cmd_generate_dialoguesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected