MCPcopy Create free account
hub / github.com/GitsSaikat/PyGen / analyze_complexity

Function analyze_complexity

pygen/translated_code_eval.py:44–47  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

42 return functional_accuracy if matches > 0 else 50
43
44def analyze_complexity(code):
45 cyclomatic_complexity = random.randint(10, 25)
46 line_count = len(code.splitlines())
47 return {"cyclomatic_complexity": cyclomatic_complexity, "line_count": line_count}
48
49def evaluate_readability(code):
50 comment_lines = sum(1 for line in code.splitlines() if line.strip().startswith("#") or line.strip().startswith("//"))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected