Prospector
Prospector is a comprehensive Python code analysis tool that aggregates results from various static analysis tools like Pylint, Mypy, and Flake8. It offers a unified interface for code quality checks, supporting configurable profiles and output formats. Currently at version 1.18.0, Prospector maintains an active development pace with frequent releases addressing dependency updates, bug fixes, and minor feature enhancements.
Warnings
- breaking The `pylint-flask` tool was removed due to being unmaintained and incompatible with newer `setuptools` versions. Projects relying on `pylint-flask` through Prospector will no longer have those checks.
- gotcha Performance can be an issue on large codebases due to the aggregation of multiple analysis tools. This can lead to long CI/CD pipeline runtimes.
- gotcha Configuration can be complex. Managing profiles, tool-specific settings, and exclusions across `.prospector.yml`, `pyproject.toml`, or command-line arguments requires careful attention.
- gotcha Prospector bundles specific versions of its underlying analysis tools. Upgrading Prospector can implicitly upgrade these tools, potentially introducing new errors or warnings that were not present in previous versions.
Install
-
pip install prospector -
pip install prospector[with_tools]
Imports
- run
from prospector import run
Quickstart
# Run Prospector on a Python file or directory # This will use default profiles and output to console. prospector my_module.py # Run with strict checks and a zero exit code on success prospector --strict --zero-exit my_package/