Flake8 plugin to forbid backslashes for line breaks
Project description
flake8-broken-line
Do not break the line! 🚨
Installation
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) \
.finalize()
# Instead use:
some_objects.call_method(
param1, param2,
).call_other(
keyword=value
).finalize()
Error codes
Error code | Description |
---|---|
N400 | Found backslash that is used for line breaking |
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flake8-broken-line-0.4.0.tar.gz
.
File metadata
- Download URL: flake8-broken-line-0.4.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.1 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771aab5aa0997666796fed249d0e48e6c01cdfeca8c95521eea28a38b7ced4c7 |
|
MD5 | 0f6a4b83ae91cede2a6b42b1d6041582 |
|
BLAKE2b-256 | 443d30f92aa6bd0b3ebd6fff078dd112fbe7dbcf2511108566db633dc734f010 |
File details
Details for the file flake8_broken_line-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_broken_line-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.1 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c522856862239a2c7ef2c1de0276fa598572aa864bd4e9c7efc2a827538515 |
|
MD5 | 5bec68b920ad427fe106e0a5309e3533 |
|
BLAKE2b-256 | a68fea8f3cd3f1d9903868ab0dfa32739c1e75cc4ffb0be088459fde2056b92a |