Analysis rules

PragyaLint runs five independent rules. Each finding is tagged with the rule that produced it, so you can filter with --rules or read rule in JSON output.

RuleChecksConfidence
unused_file Module unreachable from any entry point. high
unused_import An imported name (or a single name inside a multi-name import) never referenced in that file. high
unused_export A top-level function/class/variable no other module ever imports. medium (or low if dynamic dispatch detected)
unused_local A top-level definition referenced nowhere in the project at all — not even within its own file. medium (or low if dynamic dispatch detected)
cycle A circular import between modules (only run with --cycles). low

unused_export vs. unused_local

These two look similar but check different things, and a definition can trigger one, both, or neither:

What's exempt from unused_export / unused_local

Restricting which rules run

# Only check for unused files and imports (fastest, highest-confidence pass)
pragyalint --rules unused_file unused_import

# Add cycle detection (off by default)
pragyalint --cycles