Skip to content

Latest commit

 

History

History
132 lines (87 loc) · 3.01 KB

index.rst

File metadata and controls

132 lines (87 loc) · 3.01 KB

Flake8: Your Tool For Style Guide Enforcement

Quickstart

Installation

To install , open an interactive shell and run:

python<version> -m pip install flake8

If you want to be installed for your default Python installation, you can instead use:

python -m pip install flake8

Note

It is very important to install on the correct version of Python for your needs. If you want to properly parse new language features in Python 3.5 (for example), you need it to be installed on 3.5 for to understand those features. In many ways, Flake8 is tied to the version of Python on which it runs.

Using Flake8

To start using , open an interactive shell and run:

flake8 path/to/code/to/check.py
# or
flake8 path/to/code/

Note

If you have installed 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 .

FAQ and Glossary

faq glossary

User Guide

All users of should read this portion of the documentation. This provides examples and documentation around 's assortment of options and how to specify them on the command-line or in configuration files.

user/index Flake8 man page <manpage>

Plugin Developer Guide

If you're maintaining a plugin for 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.

plugin-development/index

Contributor Guide

If you are reading '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 and documenting reasoning for Flake8's design.

internal/index

Release Notes and History

release-notes/index

General Indices

  • genindex
  • Index of Documented Public Modules <modindex>
  • Glossary of terms <glossary>