flake8

the modular source code checker: pep8 pyflakes and co

MIT 94 个版本 Python >=3.9
Tarek Ziade <tarek@ziade.org>
安装
pip install flake8
poetry add flake8
pipenv install flake8
conda install flake8
描述

.. image:: https://github.com/PyCQA/flake8/workflows/main/badge.svg :target: https://github.com/PyCQA/flake8/actions?query=workflow%3Amain :alt: build status

.. image:: https://results.pre-commit.ci/badge/github/PyCQA/flake8/main.svg :target: https://results.pre-commit.ci/latest/github/PyCQA/flake8/main :alt: pre-commit.ci status

.. image:: https://img.shields.io/discord/825463413634891776.svg :target: https://discord.gg/qYxpadCgkx :alt: Discord

======== Flake8

Flake8 is a wrapper around these tools:

  • PyFlakes
  • pycodestyle
  • Ned Batchelder's McCabe script

Flake8 runs all the tools by launching the single flake8 command. It displays the warnings in a per-file, merged output.

It also adds a few features:

  • files that contain this line are skipped::

    flake8: noqa

  • lines that contain a # noqa comment at the end will not issue warnings.

  • you can ignore specific errors on a line with # noqa: <error>, e.g., # noqa: E234. Multiple codes can be given, separated by comma. The noqa token is case insensitive, the colon before the list of codes is required otherwise the part after noqa is ignored

  • Git and Mercurial hooks

  • extendable through flake8.extension and flake8.formatting entry points

Quickstart

See our quickstart documentation <https://flake8.pycqa.org/en/latest/index.html#quickstart>_ for how to install and get started with Flake8.

Frequently Asked Questions

Flake8 maintains an FAQ <https://flake8.pycqa.org/en/latest/faq.html>_ in its documentation.

Questions or Feedback

If you have questions you'd like to ask the developers, or feedback you'd like to provide, feel free to use the mailing list: code-quality@python.org

We would love to hear from you. Additionally, if you have a feature you'd like to suggest, the mailing list would be the best place for it.

Links

  • Flake8 Documentation <https://flake8.pycqa.org/en/latest/>_

  • GitHub Project <https://github.com/pycqa/flake8>_

  • All (Open and Closed) Issues <https://github.com/pycqa/flake8/issues?q=is%3Aissue>_

  • Code-Quality Archives <https://mail.python.org/mailman/listinfo/code-quality>_

  • Code of Conduct <https://flake8.pycqa.org/en/latest/internal/contributing.html#code-of-conduct>_

  • Getting Started Contributing <https://flake8.pycqa.org/en/latest/internal/contributing.html>_

Maintenance

Flake8 was created by Tarek Ziadé and is currently maintained by anthony sottile <https://github.com/sponsors/asottile>_ and Ian Cordasco <https://www.coglib.com/~icordasc/>_

版本列表
7.3.0 2025-06-20
7.2.0 2025-03-29
7.1.2 2025-02-16
7.1.1 2024-08-04
7.1.0 2024-06-15
7.0.0 2024-01-05
6.1.0 2023-07-29
6.0.0 2022-11-23
5.0.4 2022-08-03
5.0.3 2022-08-01
5.0.2 2022-08-01
5.0.1 2022-07-31
5.0.0 2022-07-30
4.0.1 2021-10-11
4.0.0 2021-10-11
3.9.2 2021-05-08
3.9.1 2021-04-16
3.9.0 2021-03-14
3.8.4 2020-10-02
3.8.3 2020-06-08
3.8.2 2020-05-22
3.8.1 2020-05-12
3.8.0 2020-05-11
3.8.0a2 2020-04-24
3.8.0a1 2020-04-24
3.7.9 2019-10-28
3.7.8 2019-07-08
3.7.7 2019-02-25
3.7.6 2019-02-18
3.7.5 2019-02-04
3.7.4 2019-02-01
3.7.3 2019-01-31
3.7.2 2019-01-30
3.7.1 2019-01-30
3.7.0 2019-01-30
3.6.0 2018-10-24
3.5.0 2017-10-23
3.4.1 2017-07-28
3.4.0 2017-07-27
3.3.0 2017-02-07
3.3.0.dev0 2017-02-07
3.2.1 2016-11-21
3.2.0 2016-11-14
3.1.1 2016-11-14
3.1.0 2016-11-14
3.0.4 2016-08-08
3.0.3 2016-07-30
3.0.2 2016-07-27
3.0.2.dev1 2016-07-27
3.0.2.dev0 2016-07-27
3.0.1 2016-07-26
3.0.0 2016-07-25
3.0.0b2 2016-06-29
3.0.0b1 2016-06-25
2.6.2 2016-06-25
2.6.1 2016-06-25
2.6.0 2016-06-16
2.5.5 2016-06-14
2.5.4 2016-02-11
2.5.3 2016-02-11
2.5.2 2016-01-30
2.5.1 2015-12-08
2.5.0 2015-10-26
2.4.1 2015-05-18
2.4.0 2015-03-08
2.3.0 2015-01-04
2.2.5 2014-10-20
2.2.4 2014-10-09
2.2.3 2014-08-26
2.2.2 2014-07-05
2.2.1 2014-06-30
2.2.0 2014-06-23
2.1.0 2013-10-26
2.0 2013-02-23
1.7.0 2012-12-21
1.6.2 2012-11-25
1.6.1 2012-11-25
1.6 2012-11-17
1.5 2012-10-13
1.4 2012-07-10
1.3.1 2012-05-19
1.3 2012-03-22
1.2 2012-03-10
1.1 2012-02-14
1.0 2011-11-29
0.9 2011-11-09
0.8 2011-02-27
0.7 2011-02-18
0.6 2011-02-15
0.5 2011-02-13
0.4 2011-02-08
0.3 2011-02-08
0.2 2011-01-26
0.1 2010-08-12