flake8-broken-line
Flake8 plugin to forbid backslashes for line breaks
What it is and what it does
flake8-broken-line is a linter plugin for flake8 that enforces a specific code-style rule: it detects and flags the use of backslash characters for line continuation and reports them as N400 errors. The plugin encourages developers to use parentheses, implicit string concatenation, or triple-quoted strings instead, which are considered more readable and maintainable.
The package integrates directly into flake8's plugin system and requires only flake8 as a dependency. It supports Python 3.8 through 3.11 and has been in production use since 2018. The plugin is part of the wemake-python-styleguide ecosystem and is designed for teams that want to enforce consistent line-breaking practices across their codebase.
Use it for:
- Enforce consistent code style in a team project by automatically flagging backslash continuations during CI/CD linting runs.
- Migrate legacy Python code away from backslash line breaks to more modern, parenthesis-based formatting.
- Integrate into wemake-python-styleguide or a custom flake8 configuration to enforce a no-backslash-continuation policy.
- Catch accidental backslash line breaks in code reviews before they are merged.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that detects and forbids backslash line continuations in Python code, enforcing cleaner alternatives like parentheses or implicit string concatenation.
Yes, if you want to enforce a no-backslash-continuation rule in your codebase. The plugin is stable, has low install friction, carries no license restrictions, and integrates seamlessly into flake8. The dormant maintenance status is not a blocker for a mature, single-purpose linter rule, but verify compatibility with your flake8 version before adopting it in new projects.
Install
flake8-broken-line on PyPI
pip
pip install flake8-broken-lineuv
uv add flake8-broken-linepoetry
poetry add flake8-broken-lineInstalling flake8-broken-line
Before you install
Low friction: pure Python wheel with only flake8 as a runtime dependency. Maintenance is dormant (last release 2023-05-31, last commit 2025-01-03), but the package is marked Production/Stable and has accumulated 111 repository stars, suggesting it is mature and unlikely to require active updates.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install flake8-broken-line
# Then run flake8 on your code; the plugin activates automatically.
# It will report N400 errors for backslash line breaks:
flake8 your_file.py
Requires flake8 to be installed and available in the same environment; the plugin integrates as a flake8 extension and does not run standalone.
Verify before relying
- Whether the plugin is actively maintained beyond the 2025-01-03 commit or if dormant status indicates it will not receive updates for new flake8 versions.
- Compatibility with flake8 versions released after the package's latest release (2023-05-31).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | dormant — 1,171 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 709,818/month — #5,261 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_broken_line-1.0.0-py3-none-any.whl
Keywords: flake8, flake8-plugin, linting, linter, wemake.services, code quality
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
wemake-python-styleguideA flake8 plugin that enforces strict,…
permissive · top 15,000 on PyPI
flake8-implicit-str-concatA Flake8 plugin that detects and reports…
permissive · top 15,000 on PyPI
flake8-executableA Flake8 plugin that detects and reports…
copyleft · top 15,000 on PyPI
flake8-no-implicit-concatA flake8 plugin that detects and forbids…
permissive · top 15,000 on PyPI
flake8-eradicateA flake8 plugin that detects commented-out code…
permissive · top 15,000 on PyPI
flake8-string-formatA Flake8 plugin that validates string format…
permissive · top 15,000 on PyPI
mbakembake formats and lints Makefiles, enforcing…
permissive · top 15,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-literalA flake8 plugin that enforces consistent…
copyleft · top 15,000 on PyPI
flake8-printA flake8 plugin that detects print statements…
permissive · top 5,000 on PyPI