Flake8

What Flake8 is
Flake8 is a free Python code checker for Linux that brings style and quality checks together in a command-line tool. It runs pycodestyle, pyflakes, and McCabe, which are installed by default, and can add community or locally configured plugins. When Flake8 runs, it presents warnings in merged output organized by file. Users can choose which error codes to report or ignore and set exceptions for individual files.
Projects can keep settings in INI format in setup.cfg, tox.ini, or .flake8. Flake8 can also be used as a pre-commit hook; its README lists Git and Mercurial hooks. Plugin developers have guidance for creating or maintaining extensions, while users have a guide to using the tool. Flake8 supports custom rules and CI, but does not provide autofix, security rules, or IDE support. Third-party plugin accuracy and reliability can vary, and plugins are not guaranteed to work with Flake8 3.0.
Who it suits
Flake8 suits Python developers who want command-line style and quality checks, configurable error selection, and project-level settings. Its plugin support and developer guidance also suit people who need to extend or maintain checks.
What it does well
- Free, open-source command-line tool for Python.
- Combines pycodestyle, pyflakes, and McCabe checks.
- Supports community and locally configured plugins.
- Allows error-code selection and per-file ignores.
- Can run with pre-commit, Git, and Mercurial hooks.
- Supports CI and custom rules.
What to know first
- No autofix, security rules, or IDE support.
- Third-party plugin accuracy and reliability can vary.
- Third-party plugins are not guaranteed to work with Flake8 3.0.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Flake8 | MIT-licensed Python package · requires Python >=3.10 | Free |
As flake8.pycqa.org lists them, read 15 Oct 2026. The maker's own page has the final word.
Getting started
- Open the Flake8 website.
- Install Flake8 with pip for the Python version you intend to use.
- Choose a project configuration file: setup.cfg, tox.ini, or .flake8.
- Set INI options, including error codes to select or ignore and any per-file ignores.
- Run Flake8 from the command line, or add it as a pre-commit hook.
Verdict
Choose Flake8 for free, configurable Python checks from the command line, especially when plugins or version-control hooks fit your workflow. Look elsewhere if you need autofix, security rules, or IDE support.
Questions
How much does Flake8 cost?
Flake8 is free. Its listed plan is free.
Which platforms does Flake8 support?
Linux is the listed platform. Flake8 runs from the command line.
Can I extend or customize Flake8?
Yes. Flake8 supports community plugins, local check and reporting plugins, and custom rules. Project settings can select or ignore error codes and apply per-file ignores.
Does Flake8 support CI or IDEs?
CI support is listed; IDE support is none. Flake8 also has no autofix or security rules.
How do I install Flake8?
The quickstart directs users to install it with pip for the Python version they intend to use.
Can I use Flake8 with hooks?
Flake8 can be included as a pre-commit hook, and its README lists Git and Mercurial hooks.
Facts from Flake8's own pages
- Built-in checks
- Flake8 installs pycodestyle, pyflakes, and mccabe by default. · flake8.pycqa.org, 7 Oct 2026
- Complexity analysis
- McCabe checks are enabled through the C90 family and require the max-complexity option to report complexity violations. · flake8.pycqa.org, 15 Oct 2026
- Configurable checks
- Users can select or ignore error codes and configure per-file ignores. · flake8.pycqa.org, 7 Oct 2026
- Configuration
- Project configuration can be stored in setup.cfg, tox.ini, or .flake8 using INI format. · flake8.pycqa.org, 7 Oct 2026
- Configuration files
- The documented project configuration locations are setup.cfg, tox.ini and .flake8, using an INI [flake8] section. · flake8.pycqa.org, 15 Oct 2026
- Configuration precedence
- Command-line options override project configuration, which overrides defaults. · flake8.pycqa.org, 15 Oct 2026
- Core checks
- The default violation groups cover McCabe complexity (C90), pycodestyle errors (E), pyflakes errors (F) and pycodestyle warnings (W). · flake8.pycqa.org, 15 Oct 2026
- Extensibility
- Flake8 supports community plugins, most of which are uploaded to PyPI, and provides guidance for plugin developers. · flake8.pycqa.org, 7 Oct 2026
- File suppression
- Entire files can be skipped with an exclude configuration or a # flake8: noqa header. · flake8.pycqa.org, 15 Oct 2026
- GitHub activity
- The public repository showed about 3.8k stars, 362 forks and 2,544 commits when opened. · github.com, 15 Oct 2026
- Homebrew distribution
- Homebrew offers flake8 through brew install flake8, lists MIT licensing and version 7.4.1, and depends on [email protected]. · formulae.brew.sh, 15 Oct 2026
- How it runs
- Flake8 runs from the command line and displays warnings in merged per-file output. · github.com, 7 Oct 2026
- Inline suppression
- A line can suppress selected diagnostics with a case-insensitive # noqa comment and one or more error codes. · flake8.pycqa.org, 15 Oct 2026
- Installation
- The official quickstart installs Flake8 with python -m pip install flake8 and recommends invoking the interpreter-specific module when multiple Python versions are installed. · flake8.pycqa.org, 15 Oct 2026
- Interpreter coupling
- The documentation says Flake8 must run under the Python version whose syntax it needs to parse, so installing it for one interpreter does not install it for another. · flake8.pycqa.org, 15 Oct 2026
- Latest release
- PyPI lists version 7.4.1 uploaded on September 23, 2026. · pypi.org, 15 Oct 2026
- Licence
- PyPI identifies Flake8 as MIT licensed. · pypi.org, 15 Oct 2026
- Limit: analysis scope
- A Reddit comparison noted that Flake8's ecosystem cannot perform some cross-file and type-inference checks, such as detecting a function called with the wrong number of arguments. · reddit.com, 15 Oct 2026
- Limit: configuration format
- Reddit commenters criticized Flake8 for not supporting pyproject.toml configuration and described its issue discussions as difficult to navigate. · reddit.com, 15 Oct 2026
- Limit: no automatic fixes
- A Stack Overflow answer by Flake8 maintainer Anthony Sottile states that Flake8 only checks code and users need a formatter such as Black or autopep8 to modify it. · stackoverflow.com, 15 Oct 2026
- Limit: speed
- A Princeton software-quality handout measured Flake8 at 12.26 seconds in its comparison, much slower than Ruff's 0.29 seconds. · researchcomputing.princeton.edu, 15 Oct 2026
- Local plugins
- Projects can define local extension and reporter plugins in a flake8:local-plugins section and optionally add import paths. · flake8.pycqa.org, 15 Oct 2026
- Maker and maintainers
- The project was created by Tarek Ziadé and is maintained by Anthony Sottile and Ian Cordasco. · github.com, 15 Oct 2026
- Plugin caveat
- The documentation says third-party plugin accuracy and reliability may vary and that plugins are not guaranteed to work with Flake8 3.0. · flake8.pycqa.org, 7 Oct 2026
Where Flake8 stands on Freedom251
- Linters#2 of 33