Introducing
The Slant team built an AI & it’s awesome
Find the best product instantly
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now
4.7 star rating
0
Development
Python
What are the best open source Python static analysis tools?
5
Options
Considered
36
User
Recs.
Jul 3, 2021
Last
Updated
Related Questions
Activity
Have feedback or ideas?
Join our community
on Discord
Ad
5
Options
Considered
Best open source Python static analysis tools
Price
Initial Release
Python Versions Supported
--
flake8
-
February 15, 2010
3.6.1+
--
Pylint
-
May 19, 2003
3.7.2+
--
mypy
-
October 28, 2012
3.6+
--
pyflakes
-
September 23, 2005
2.7 / 3.6+
--
CrossHair
0.00
-
-
See Full List
--
flake8
My Rec
ommendation
for
flake8
My Recommendation for
flake8
All
6
Pros
4
Cons
1
Specs
Top
Pro
•••
Integration with build tools like tox
Project-level settings for flake8 are in the tox settings file. It is trivial to run flake8 inside setup.py or pavement.py.
See More
Top
Con
•••
Underlying tools are fixed
Although Flake8 wraps multiple tools, it is not flexible in which tools it wraps. If you don't agree with the rules implemented in PyFlakes and pep8, then you have to drop all 3 wrapped tools to use something else like PyLint.
See More
Specs
Initial Release:
February 15, 2010
Python Versions Supported:
3.6.1+
Latest Release Date:
October 11, 2021
Analysis Type:
Static
See All Specs
Top
Pro
•••
Allows usage of and writing of plugins
Flake8 has the ability to run thrid-party plugins, including plugins you can write yourself. Here you can find a few useful plugins.
See More
Top
Pro
•••
Easy to ignore files and lines
Add "noqa" comments to files and lines to skip processing. Code comments make it easy to find and review exceptions with grep.
See More
Top
Pro
•••
Wraps multiple analysis tools
Flake8 is a wrapper around PyFlakes, pep8, and McCabe Complexity analysis.
See More
Hide
See All
Get it
here
Recommend
13
--
Pylint
My Rec
ommendation
for
Pylint
My Recommendation for
Pylint
All
8
Pros
6
Cons
1
Specs
Top
Pro
•••
Full, detailed reports
Pylint gives very detailed reports of your code. It even provides ASCII tables with detailed statistics about the results. Data for the previous and current code execution is also available with the difference, allowing you to easily see the progress that you have made.
See More
Top
Con
•••
May need to compile from source to install it correctly
There are some dependencies from Logilab that Pylint needs. They can easily be found in the README but trying to install them with easy_install can yield some problems with unresolved dependencies.
See More
Specs
Initial Release:
May 19, 2003
Python Versions Supported:
3.7.2+
Latest Release Date:
June 18, 2022
Analysis Type:
Static
See All Specs
Top
Pro
•••
Works with Vim
Through the plugin ALE.
See More
Top
Pro
•••
Easily enable or disable a particular message
Each check in pylint has a unique id, so you can choose to disable or enable that particular message in subsequent executions. Just run -enable-msg or -disable-msg and the message id.
See More
Top
Pro
•••
Fine-grained control
In addition to the ability to enable or disable warnings, Pylint also gives the developer a great degree of control through command line options. These range from regular expressions to enforce naming conventions to various settings to watch for complexity issues.
See More
Top
Pro
•••
Configurable
Pylint has a configuration file which can be tweaked to choose what kind of warning messages you want. This way you can choose to opt out of receiving warnings that you may consider useless.
See More
Top
Pro
•••
Great documentation
The documentation is thorough and complete. They provide information for any kind of warning that Pylint may raise and how to deal with them, enable/disable them and how to interpret them.
See More
Hide
See All
Get it
here
Recommend
16
--
mypy
My Rec
ommendation
for
mypy
My Recommendation for
mypy
All
4
Pros
2
Cons
1
Specs
Top
Pro
•••
Powerful type checker
Mypy's type checker checks the types of function parameters, supports type inference, typed collections and has even some support for generics.
See More
Top
Con
•••
Still an experimental project
Mypy is still an unfinished experimental project. It is prone to bugs and to features being changed and removed. Plus, a large part of Python features is yet to be implemented.
See More
Specs
Initial Release:
October 28, 2012
Python Versions Supported:
3.6+
Latest Release Date:
June 6, 2022
Analysis Type:
Hybrid
Top
Pro
•••
Works in a truly static way
Mypy works in a truly static way. The checker makes all the checks before the code is actually run, but it still catches a lot of bugs.
See More
Hide
See All
Get it
here
Recommend
3
--
pyflakes
My Rec
ommendation
for
pyflakes
My Recommendation for
pyflakes
All
4
Pros
2
Cons
1
Specs
Top
Pro
•••
Very fast
Because it looks for errors from a small group of possible mistakes, pyflakes is very fast. When dealing with many lines of code this is a very useful feature. When used in conjunction with an IDE, it checks the code as it's being edited.
See More
Top
Con
•••
Not very powerful
Pyflakes only checks for names that are defined but never used or names that are redefined without being used. It also does not have command line options that offer a degree of control for the tests that you are running.
See More
Specs
Initial Release:
September 23, 2005
Latest Release Date:
October 6, 2021
Python Versions Supported:
2.7 / 3.6+
Top
Pro
•••
Easy installation
The installation process for pyflakes is as easy as it can be. Can be installed with easy_install or pip and you are ready to go.
See More
Hide
See All
Get it
here
Recommend
2
--
CrossHair
My Rec
ommendation
for
CrossHair
My Recommendation for
CrossHair
Hide
0.00
Recommend
2
Don't see your favorite option? Add it.
Built By the Slant team
Find the best product instantly.
4.7 star rating
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now - it's free
One sec!
Are you sure that you want to abandon your hard work?
Delete Work
Continue working
{}
undefined
url next
price drop