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
Close
Hashes for flake8_broken_line-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 167130fcb4761755e9919c0bc8f984ff5790df1ff7a4447fed5c00b09ea6b4c3 |
|
MD5 | 2be811ccaa0b9150921995a5a7f0dbfc |
|
BLAKE2b-256 | 8d3a56d1ac2444c71d62f4f83b64eedcd4ffdc0171ac048638f930bd85170115 |