Flake8: Your Tool For Style Guide Enforcement¶
Quickstart¶
Installation¶
To install Flake8, open an interactive shell and run:
python<version> -m pip install flake8
If you want Flake8 to be installed for your default Python installation, you can instead use:
python -m pip install flake8
Note
It is very important to install Flake8 on the correct version of Python for your needs. If you want Flake8 to properly parse new language features in Python 3.5 (for example), you need it to be installed on 3.5 for Flake8 to understand those features. In many ways, Flake8 is tied to the version of Python on which it runs.
Using Flake8¶
To start using Flake8, open an interactive shell and run:
flake8 path/to/code/to/check.py
# or
flake8 path/to/code/
Note
If you have installed Flake8 on a particular version of Python (or on
several versions), it may be best to instead run python<version> -m
flake8
.
If you only want to see the instances of a specific warning or error, you can select that error like so:
flake8 --select E123,W503 path/to/code/
Alternatively, if you want to ignore only one specific warning or error:
flake8 --ignore E24,W504 path/to/code/
Please read our user guide for more information about how to use and configure Flake8.
FAQ and Glossary¶
User Guide¶
All users of Flake8 should read this portion of the documentation. This provides examples and documentation around Flake8‘s assortment of options and how to specify them on the command-line or in configuration files.
Plugin Developer Guide¶
If you’re maintaining a plugin for Flake8 or creating a new one, you should read this section of the documentation. It explains how you can write your plugins and distribute them to others.
Contributor Guide¶
If you are reading Flake8‘s source code for fun or looking to contribute, you should read this portion of the documentation. This is a mix of documenting the internal-only interfaces Flake8 and documenting reasoning for Flake8’s design.
Release Notes and History¶
- Release Notes and History
- 3.0.2 – 2016-07-26
- 3.0.1 – 2016-07-25
- 3.0.0 – 2016-07-25
- 2.6.2 - 2016-06-25
- 2.6.1 - 2016-06-25
- 2.6.0 - 2016-06-15
- 2.5.5 - 2016-06-14
- 2.5.4 - 2016-02-11
- 2.5.3 - 2016-02-11
- 2.5.2 - 2016-01-30
- 2.5.1 - 2015-12-08
- 2.5.0 - 2015-10-26
- 2.4.1 - 2015-05-18
- 2.4.0 - 2015-03-07
- 2.3.0 - 2015-01-04
- 2.2.5 - 2014-10-19
- 2.2.4 - 2014-10-09
- 2.2.3 - 2014-08-25
- 2.2.2 - 2014-07-04
- 2.2.1 - 2014-06-30
- 2.2.0 - 2014-06-22
- 2.1.0 - 2013-10-26
- 2.0.0 - 2013-02-23
- 1.7.0 - 2012-12-21
- 1.6.2 - 2012-11-25
- 1.6.1 - 2012-11-24
- 1.6 - 2012-11-16
- 1.5 - 2012-10-13
- 1.4 - 2012-07-12
- 1.3.1 - 2012-05-19
- 1.3 - 2012-03-12
- 1.2 - 2012-02-12
- 1.1 - 2012-02-14
- 1.0 - 2011-11-29
- 0.9 - 2011-11-09
- 0.8 - 2011-02-27
- 0.7 - 2010-02-18
- 0.6 - 2010-02-15