MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / parse_problem_range

Function parse_problem_range

kernelbench/scorer.py:78–88  ·  view source on GitHub ↗

Parse '1-10' or '1,3,5,7' into a list of problem IDs.

(range_str: str)

Source from the content-addressed store, hash-verified

76
77
78def parse_problem_range(range_str: str) -> List[int]:
79 """Parse '1-10' or '1,3,5,7' into a list of problem IDs."""
80 ids = []
81 for part in range_str.split(","):
82 part = part.strip()
83 if "-" in part:
84 start, end = part.split("-", 1)
85 ids.extend(range(int(start), int(end) + 1))
86 else:
87 ids.append(int(part))
88 return ids
89
90
91def run_single_problem(

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected