Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

code checking using pep8 and pyflakes

Project description

Flake8 is a wrapper around these tools:

  • PyFlakes
  • pep8
  • Ned’s MacCabe script

Flake8 runs all tools by launching the single ‘flake8’ script, but ignores pep8 and PyFlakes extended options and just uses defaults. It displays the warnings in a per-file, merged output.

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

  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
flake8-0.5.tar.gz (31.5 kB) Copy SHA256 hash SHA256 Source None Feb 13, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page