flake8 /

Filename Size Date modified Message
bin
flake8
135 B
1.1 KB
994 B
660 B

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:

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.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.