Pylint analyzes Python code without executing it, reporting errors, style issues, and refactor hints. It infers values through astroid to catch problems typing alone may miss.
Overview
Pylint targets Python 3.11 and newer as a static analysis CLI and library. It enforces configurable coding standards, detects code smells, and offers suggestions beyond syntax checking.
Its differentiator is aggressive inference: pylint models likely runtime values even when annotations are incomplete, which can surface incorrect attribute or import usage at the cost of slower runs. Teams often start with --errors-only and selectively enable convention or refactor messages.
The ecosystem supports editor integration, shared configuration files, and custom check plugins for internal libraries. Bundled utilities include pyreverse for diagram generation and symilar for similarity detection.
Installation is via pip, including an optional spelling extra. Documentation describes plugin loading and pairing with tools such as mypy, ruff, or flake8.
Key features
- Static analysis without execution
- astroid-based value inference
- Configurable rule categories
- Custom check plugins
- Editor and CI integration
- pyreverse diagram utility
- Optional spelling checks
- Large third-party plugin ecosystem
Use cases
- Legacy codebase lint adoption
- Finding latent runtime-type bugs
- Enforcing house style rules
- Generating package diagrams