flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code. https://flake8.pycqa.org
Find a file
2011-02-13 12:35:01 +01:00
bin code cleanup 2011-02-13 12:35:01 +01:00
flake8 code cleanup 2011-02-13 12:35:01 +01:00
.hgignore code cleanup 2011-02-13 12:35:01 +01:00
.hgtags Added tag 0.4 for changeset 28547d530102 2011-02-08 12:06:15 +01:00
LICENSE initial commit 2010-08-12 14:40:53 +02:00
README added a header to skip files 2011-02-08 11:46:21 +01:00
setup.py bumped 2011-02-08 12:06:11 +01:00

======
Flake8
======

Flake8 is just a merge of the PyFlakes and the pep8 projects into one single
script.

It runs both tests by launching the single 'flake8' script, but ignores pep8
options and just uses its defaults.

It also adds a few features:

- files that starts with this header are skipped::

    # flake8: noqa

- lines that contains a "# NOQA" comment at the end will not issue a warning
- merging pep8 and pyflakes options
- a Mercurial hook
- more things to come..

Original projects:

- pep8: http://github.com/jcrocholl/pep8/
- PyFlakes: http://divmod.org/trac/wiki/DivmodPyflakes


Mercurial hook
==============

To use the Mercurial hook on any *commit* or *qrefresh*, change your .hg/rc file
like this::

    [hooks]
    commit = python:flake8.hg_hook
    qrefresh = python:flake8.hg_hook

    [flake8]
    strict = 0


If *strict* option is set to **1**, any warning will block the commit. When
*strict* is set to **0**, warnings are just displayed in the standard output.