Every finding carries a confidence level. It's not a percentage or a machine-learning score — it reflects how certain the underlying static-analysis claim is.
| Level | Means | Example |
|---|---|---|
| high | Structurally certain — provable from the import graph alone. | A module nothing imports; an imported name never referenced in that file. |
| medium | Strongly implied, but static analysis can't rule out an external caller (a library's public API) or an unusual internal pattern. | An exported function no module in this project imports. |
| low | Heuristic, or downgraded because the project uses a pattern (dynamic dispatch, import cycles) that undermines the analysis's certainty. | A dead-looking constant assignment; any finding in a project that also uses exec/eval/getattr/globals() somewhere. |
--fail-on — for CIControls what makes the process exit non-zero. Findings are still reported below this threshold; they just don't fail the run.
pragyalint --fail-on high # only HIGH findings fail CI (default: never fails)
pragyalint --fail-on medium # MEDIUM and HIGH fail CI
--confidence — for --fix
Controls which findings the fixer is allowed to actually delete.
Plain --fix only touches HIGH-confidence findings.
pragyalint --fix # HIGH only
pragyalint --fix --confidence medium+ # MEDIUM and HIGH
pragyalint --fix --confidence all # everything, including LOW
--confidence all, the fixer
still won't delete definitions from a project where dynamic dispatch
was detected unless you also pass --force. Confidence
and the dynamic-dispatch safety gate are independent checks — see
Dynamic dispatch.
A LOW-confidence finding is still useful to read — it's telling you "this looks dead, but I found something in your project that makes me unsure." Reviewing it yourself is exactly the workflow it's designed for; it's just not going to delete anything for you without an explicit override.