Skip to content
🚨 Flake8 plugin to forbid backslashes (\) for line breaks
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
tests
.editorconfig
.gitignore
.travis.yml
LICENSE
README.md
flake8_broken_line.py
poetry.lock
pyproject.toml
setup.cfg

README.md

flake8-broken-line

wemake.services Build Status Coverage Python Version PyPI version wemake-python-styleguide

Do not break the line! 🚨

Installation

pip install flake8-broken-line

Code example

Things we check with this plugin:

# String line breaks, use `()` or `"""` instead:

some_string = 'first line\
second line'

# Use a single line, `()`, or new variables instead:

if 1 == 1 and \
    2 == 2:
    print('Do not do that!')

# Do not reimplement chaining:
some_object \
  .call_method() \
  .call_other() \
  .finalize()

Error codes

Error code Description
N400 Found backslash that is used for line breaking

License

MIT.

You can’t perform that action at this time.