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.2.1.tar.gz
.
File metadata
- Download URL: flake8-broken-line-0.2.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.7 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 414477070231a5aa05468d48db2742a594b53fbc1ecba28044646706a11fb861 |
|
MD5 | f1c89d3e0697cbdef01eeb57e2598242 |
|
BLAKE2b-256 | 3dd8ccc5888b6756d54b167db297b48899df0b6ddb7afa1beceea53287da0677 |
File details
Details for the file flake8_broken_line-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: flake8_broken_line-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.7 Darwin/18.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75858359e3ccd4f1d92a9e7582aa5c9e4485cbc920dd05954703900cf907667e |
|
MD5 | 5365cf809cd3c9210af4b5d28aca5d59 |
|
BLAKE2b-256 | b3d248f4939840dbe13f30349abeb3f4df3deb58210a692addd293187a84931b |