Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Python Static Analysis Tools

644 views

Published on

A look at tools that can help us write better python.

Published in: Technology
  • Be the first to comment

Python Static Analysis Tools

  1. 1. STATIC ANAYLSIS A TOUR OF PYTHON TOOLS Created by Jason A Myers / @jasonamyers
  2. 2. STATIC ANALYSIS
  3. 3. PEP8
  4. 4. PYFLAKES Names which are used but not defined or used before they are defined Names which are redefined without having been used
  5. 5. PYROMA Checks setup.py files for errors and issues
  6. 6. PEP257 Checks that docstrings match PEP257 standards
  7. 7. VULTURE Checks for unused code
  8. 8. 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
  9. 9. COMPLEXITY Imperfect science
  10. 10. MCCABE/CYCLOMATIC COMPLEXITY Focuses on decisions made in software
  11. 11. HALSTEAD COMPLEXITY Focuses on Volume, Difficulty, and Effort
  12. 12. MAINTAINABILITY INDEX Focuses on ease to support and change
  13. 13. MCCABE
  14. 14. RADON
  15. 15. DODGY
  16. 16. BANDIT
  17. 17. FLAKE8 Flake8 is a wrapper around these tools: PyFlakes, pep8, and McCabe.
  18. 18. PROSPECTOR RUN ALL THE THINGS! Combines: PyLint, PEP8, pyflakes, McCabe, dodgy, and PEP257 Optionally: Pyroma and Vulture
  19. 19. PRE-COMMIT Runs before if lets you create a commit on your machine
  20. 20. QUESTIONS?

×