Skip to main content

Flake8 plugin to forbid backslashes for line breaks

Project description

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.

Project details


Download files

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

Source Distribution

flake8-broken-line-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

flake8_broken_line-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file flake8-broken-line-0.1.1.tar.gz.

File metadata

  • Download URL: flake8-broken-line-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.3 Darwin/18.6.0

File hashes

Hashes for flake8-broken-line-0.1.1.tar.gz
Algorithm Hash digest
SHA256 30378a3749911e453d0a9e03204156cbbd35bcc03fb89f12e6a5206e5baf3537
MD5 2d326b4b81173c6d5b0373ed9c2a26ad
BLAKE2b-256 11fe2342935e75085fb496984fed56ab050979bfedec89f82bf5fccb982635e2

See more details on using hashes here.

File details

Details for the file flake8_broken_line-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_broken_line-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7721725dce3aeee1df371a252822f1fcecfaf2766dcf5bac54ee1b3f779ee9d1
MD5 25c8358f04a85aae49a45fbdee054867
BLAKE2b-256 eff6bdbd3edbda7f673dab4a3850dac05d83948621ce0782160cdcd72a1e7e30

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page