Static code analysis in Python?

What useful static code analysis you can recommend for Python. I find them useful for refactoring code. I know

  • snakefood for module dependencies
  • pycallgraph for dynamic call schedules
  • pylint for errors

Are there static call analyzers? If I wanted to program a custom, what would be the easiest way?

What other type of static code verification can you imagine? Or maybe even Python magic like ABC?

EDIT: I found that either using http://docs.python.org/3.3/library/ast.html or even http://www.astroid.org/ can be used to program a specific user parser. You can then use graphviz for visualization, or even PlantUML for UML graphs.

+5
source share
4 answers

check out pychecker and pyflakes . There was a famous discussion question pylint-pychecker-or-pyflakes

+2
source

This is a very powerful pferon type inferencer https://github.com/yinwang0/pysonar2

, , , .

+2

Not really a "static code analyzer", but even a little more:

http://code.google.com/p/shedskin/

0
source

Pysonar2 is a very nice implementation abstract interpretationfor typing Python project types. My answer to another similar question is here .

0
source

All Articles