skillfed

flake8-broken-line

Flake8 plugin to forbid backslashes for line breaks

flake8-broken-line v1.0.0 709.8K downloads/30d#5,261 on PyPI111
Permissive license MIT DORMANT released

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-line

uv

uv add flake8-broken-line

poetry

poetry add flake8-broken-line

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Tags

flake8 backslash line break detectionpython line continuation linterforbid backslash continuationflake8 code style pluginpython line breaking rules
linter-plugincode-style

More Python Modules packages