Observed since 20 Oct, 22:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Function-level CRAP analysis for Python using LCOV coverage.
Analyze function-level CRAP scores for Python using LCOV line coverage.
python -m pip install agentic-crap-py
agentic-crap-py --source src --lcov coverage/lcov.info --threshold 10
For a local checkout, run python -m pip install . and then agentic-crap-py --source src --lcov coverage/lcov.info.
Pass coverage generation as a JSON argv array. It is executed directly without a shell, so shell syntax, pipelines, and interpolation are intentionally not supported.
agentic-crap-py --source src --coverage-command '["python","-m","coverage","lcov","-o","coverage/lcov.info"]' --lcov coverage/lcov.info --json
An existing LCOV file is removed before this command runs. The command must create the requested LCOV file or analysis fails, preventing stale coverage from being accepted.
Use --json for deterministic compact JSON, sorted by file, line, and function.
| Exit code | Meaning |
|---|---|
0 | Every selected function has coverage and is within the threshold. |
1 | A CRAP score exceeds the threshold. |
2 | Coverage is missing, malformed, unmapped, or analysis cannot run. |
For cyclomatic complexity CC and line coverage ratio C, the score is:
CRAP = CC^2 * (1 - C)^3 + CC
Nested function bodies are excluded from an enclosing function's coverage and complexity calculation. A function with no mapped LCOV lines is reported as N/A and fails rather than passing.
python -m unittest discover -s tests -v
Python 3.10 or newer is required. The runtime uses only the Python standard library; generate LCOV using the coverage tooling already used by your project.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 16 Sept 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:76b0725b1137ebb7be663127fe9bb1975e7cd8e71d23f650e5a673185fbe00b6