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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size flake8_broken_line-0.3.0-py3-none-any.whl (4.2 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size flake8-broken-line-0.3.0.tar.gz (4.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for flake8_broken_line-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 611f79c7f27118e7e5d3dc098ef7681c40aeadf23783700c5dbee840d2baf3af |
|
MD5 | cbba6b3c3b26641fe567528a22c45b55 |
|
BLAKE2-256 | 8bcc150a4a3a8cd3bea9d176a786c09f68d078f9a13e986a0b2050e5c0a2f246 |