KEMBAR78
Python Static Analysis Tools | PDF
STATIC ANAYLSIS
A TOUR OF PYTHON TOOLS
Created by Jason A Myers / @jasonamyers
STATIC ANALYSIS
PEP8
PYFLAKES
Names which are used but not defined or used before
they are defined
Names which are redefined without having been used
PYROMA
Checks setup.py files for errors and issues
PEP257
Checks that docstrings match PEP257 standards
VULTURE
Checks for unused code
PYLINT
Looks at your project as a whole and reports back very
detailed information on Code Standards, ineffecient code,
errored implementation code, and duplicate code
COMPLEXITY
Imperfect science
MCCABE/CYCLOMATIC COMPLEXITY
Focuses on decisions made in software
HALSTEAD COMPLEXITY
Focuses on Volume, Difficulty, and Effort
MAINTAINABILITY INDEX
Focuses on ease to support and change
MCCABE
RADON
DODGY
BANDIT
FLAKE8
Flake8 is a wrapper around these tools: PyFlakes, pep8, and
McCabe.
PROSPECTOR
RUN ALL THE THINGS!
Combines: PyLint, PEP8, pyflakes, McCabe, dodgy, and
PEP257
Optionally: Pyroma and Vulture
PRE-COMMIT
Runs before if lets you create a commit on your machine
QUESTIONS?

Python Static Analysis Tools