MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / _generate_random_section

Function _generate_random_section

python-impl/evogit/api.py:343–350  ·  view source on GitHub ↗

Generate a random section of the code, 64 - 128 lines long

(n_lines: int)

Source from the content-addressed store, hash-verified

341
342
343def _generate_random_section(n_lines: int) -> Tuple[int, int]:
344 """Generate a random section of the code, 64 - 128 lines long"""
345 random_length = random.randint(64, 128)
346 if random_length > n_lines:
347 random_length = n_lines
348 random_start = random.randint(0, n_lines - random_length)
349 random_end = random_start + random_length
350 return random_start, random_end
351
352
353def _gather_info(config, commits) -> list[dict[str, Any]]:

Callers 1

_gather_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected