Prune your Python.
Ship only what you use.
PragyaLint builds a dependency graph from your entry points and flags everything that's never reached — unused files, imports, exports, and functions. Then it removes the safe ones for you.
Everything you need to clean up
Detect once, verify, then remove — with safety built in.
Unreachable files
Modules that nothing reaches from your entry points are flagged at high confidence and can be deleted in one pass.
Dead imports
Never-imported names get trimmed, including individual names inside multi-name imports.
Unused exports & functions
Find defined-but-unused functions, classes, and variables — and remove them with confidence gating.
Confidence levels
Every finding is rated high, medium, or low so you know what to trust.
CI-ready
--fail-on high blocks your pipeline on new dead code.
JSON and SARIF output integrate anywhere.
Dry-run first
Preview every change with --dry-run before anything
touches disk. Explicit, never implicit.
Built with the standard library
No parser to ship, no dependencies to wrangle.
Pure Python • ast-powered
PragyaLint uses the Python standard-library ast module
to parse and analyze code. That means a complete, battle-tested
parser with zero external dependencies and clean
distribution via PyPI or pipx.
Inspired by OptiPrune
PragyaLint brings the same concept as OptiPrune (a dead-code analyzer for TypeScript/JavaScript) to the Python ecosystem.