PragyaLint is a small, dependency-free codebase — the analysis engine, the fixer, and the finders all live in one package with a tidy test suite. Here's how to get set up and what the maintainers expect.
git clone https://github.com/Sanskriti-Studios/PragyaLint
cd PragyaLint
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows (cmd)
.venv\Scripts\Activate.ps1 # Windows (PowerShell)
pip install -e ".[dev]"
pytest -q
Requires Python 3.11 or newer. The dev extra is just pytest — the package itself stays zero-dependency.
| Path | What it's for |
|---|---|
pragyalint/ | The package. |
pragyalint/analyzer.py | Pipeline: graph, reachability, then finder passes. |
pragyalint/graph.py | Discovery, AST parsing, imports/exports, cycle detection. |
pragyalint/finders/ | One file per rule (unused_*, cycles). |
pragyalint/fixer.py | Opt-in, confidence-gated edits. |
pragyalint/reporters/ | Terminal, JSON, and SARIF formatting. |
pragyalint/dynamic.py | Dynamic-dispatch heuristics and the keep pragma. |
pragyalint/config.py | Config discovery and defaults. |
tests/ | pytest suite — one module per area (test_graph, test_exports, test_fixer, …). |
site/ | This static documentation site. |
extensions/vscode-pragyalint/ | VS Code extension source. |
pytest -q # whole suite
pytest tests/test_graph.py # a single module
pytest -k "exports or dynamic" # by keyword
New rules or behaviors need tests that build a tiny fixture tree in a temp directory and assert on the emitted findings — follow the existing test style. The repo's CI gate also runs a self-analysis:
pragyalint --fail-on high --include pragyalint
| Workflow | Runs |
|---|---|
tests.yml | pytest on Python 3.11/3.12/3.13 plus the self-analysis gate, on push and PR. |
pages.yml | Deploys site/ to GitHub Pages on push to main. |
publish.yml | Builds and publishes to PyPI and GitHub Releases; triggers on a release: commit. |
bins.yml | Builds standalone Windows/Linux/macOS binaries with PyInstaller and attaches them to releases. |
finders/.site/docs/ and its entry in site/js/docs-nav.js.CHANGELOG.md for user-visible changes.pragyalint -v output when relevant.fix:, feat:, chore:, docs: — matching the existing history.Issues and PRs: github.com/Sanskriti-Studios/PragyaLint/issues