Skip to main content

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.run.hg_hook
qrefresh = python:flake8.run.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.

CHANGES

0.9 - 2011-11-09

  • update pep8 version to 0.6.1

  • mccabe check: gracefully handle compile failure

0.8 - 2011-02-27

  • fixed hg hook

  • discard unexisting files on hook check

0.7 - 2010-02-18

  • Fix pep8 intialization when run through Hg

  • Make pep8 short options work when run throug the command line

  • skip duplicates when controlling files via Hg

0.6 - 2010-02-15

  • Fix the McCabe metric on some loops

Project details


Release history Release notifications | RSS feed

This version

0.9

Download files

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

Source Distribution

flake8-0.9.tar.gz (26.1 kB view details)

Uploaded Source

File details

Details for the file flake8-0.9.tar.gz.

File metadata

  • Download URL: flake8-0.9.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flake8-0.9.tar.gz
Algorithm Hash digest
SHA256 12347680f1b9afb2094ca1ffb3139217fdab3c0307bc0984af11199b1ea9852b
MD5 e607b3411bad71c04bc3c3355eec69e8
BLAKE2b-256 e6ee174942e953285d6a4da4495ad79385f39cef0141f4f4e8d099477fd51b83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page