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.
Metadata
Release files for flake8-broken-line 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8-broken-line-0.2.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_broken_line-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / flake8-broken-line-0.2.0.tar.gz
| Download URL | flake8-broken-line-0.2.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
550d217ebcdb1d3febc3a7dd5962b2deb4f809a5b0f10b7632b416c4877d2760
|
|
BLAKE2b-256 checksum How to use checksums |
1f1ee8402f97ecb49cab092983769b405aa253f9fae4b8f38ed12f1e31d694b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.4 CPython/3.7.3 Darwin/18.6.0
|
Release files / flake8_broken_line-0.2.0-py3-none-any.whl
| Download URL | flake8_broken_line-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
167130fcb4761755e9919c0bc8f984ff5790df1ff7a4447fed5c00b09ea6b4c3
|
|
BLAKE2b-256 checksum How to use checksums |
8d3a56d1ac2444c71d62f4f83b64eedcd4ffdc0171ac048638f930bd85170115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.4 CPython/3.7.3 Darwin/18.6.0
|