Skip to main content

Flake8 plugin to forbid backslashes for line breaks

Project description

flake8-broken-line Build Status codecov Python Version PyPI version wemake-python-styleguide

Do not break the line! 🚨


pip install flake8-broken-line

It is also a valuable part of wemake-python-styleguide.

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 use for method chaining:
some_object \
  .call_method(param1, param2) \
  .call_other(keyword=value) \

# Instead use:
    param1, param2,

Error codes

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



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-broken-line, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_broken_line-0.3.0-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-broken-line-0.3.0.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page