flake8-black
flake8 plugin to call black as a code style validator
Decision gist · record as of 2026-08-14
Yes, if you use flake8 and want black validation integrated into a single linting pass. Install it when you need unified error reporting or are already committed to flake8 as your linting hub. Skip it if you use pre-commit directly (call black and flake8 separately there instead) or if you run black as a formatter without linting integration.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; black itself can format code written for older Python versions.
- Low friction install with three straightforward runtime dependencies (flake8, black, tomli).
- Active maintenance: last commit 2026-08-03, tested on Python 3.9 through 3.13 and recent black versions including 25.9.0.
License · maintenance · safety
MIT (permissive) — MIT licensed under permissive terms, imposing no restrictions on use or distribution in your own projects.
last release 2025-09-21 (327 days) · last repo commit 2026-08-03 · 167 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 668,805 downloads/mo, #5,417 on PyPI
Alternatives
Verify before relying
pip install flake8-black
Then run flake8 normally; the plugin auto-registers:
flake8 example.py
Or select only BLK codes:
flake8 --select BLK example.py- Whether the plugin correctly handles all edge cases when black configuration differs from flake8 settings.
- Performance impact when running on large codebases with many files.
What it is and what it does
flake8-black bridges black and flake8 by letting you run black's code style checks as a flake8 plugin. Instead of running black and flake8 as separate tools, you invoke flake8 once and get BLK error codes (BLK100 for formatting violations, BLK9xx for internal errors) whenever black would reformat your code. The plugin reads black configuration from pyproject.toml if present, respecting target_version, skip_string_normalization, and line_length settings.
It's useful in CI pipelines and pre-commit hooks where you want unified linting output. The plugin depends on flake8, black, and tomli (for TOML parsing). Note that if you're already using pre-commit, you can call black and flake8 directly there instead of using this plugin—it's most valuable when you need black validation integrated into an existing flake8 workflow.
Use it for
- Enforce black formatting standards in CI without running black and flake8 as separate commands.
- Add black style checks to existing flake8 linting pipelines in git pre-commit hooks.
- Catch code that deviates from black's style before it's committed, using BLK100 violations.
- Validate that code matches black formatting in projects where black is the canonical formatter.
- Detect when black configuration changes would trigger new formatting violations across a codebase.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use flake8 and want black validation integrated into a single linting pass.
Install it when you need unified error reporting or are already committed to flake8 as your linting hub. Skip it if you use pre-commit directly (call black and flake8 separately there instead) or if you run black as a formatter without linting integration.
Install
flake8-black on PyPI
Before you install
Low friction install with three straightforward runtime dependencies (flake8, black, tomli). Active maintenance: last commit 2026-08-03, tested on Python 3.9 through 3.13 and recent black versions including 25.9.0.
Requires Python 3.9 or later; black itself can format code written for older Python versions.
License in practice
MIT licensed under permissive terms, imposing no restrictions on use or distribution in your own projects.
Quickstart
pip install flake8-black
Then run flake8 normally; the plugin auto-registers:
flake8 example.py
Or select only BLK codes:
flake8 --select BLK example.py
Verify before relying
- Whether the plugin correctly handles all edge cases when black configuration differs from flake8 settings.
- Performance impact when running on large codebases with many files.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesflake8blacktomli |
| Maintenance | Actively maintained 327 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 668,805 / month, #5,417 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_black-0.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flake8 black integration”
- flake8-blackA flake8 plugin that runs black's code style validation within the…
- ruffRuff is a Python linter and code formatter written in Rust that…
- flake8-implicit-str-concatA Flake8 plugin that detects and reports implicit string literal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also black · pytest-black · flake8 · flake8-requirements · flake8-html · flake8-noqa · flake8-django · flake8-blind-except · pylama · wemake-python-styleguide