flake8-broken-line 1.0.0
pip install flake8-broken-line
Latest version
Released:
Flake8 plugin to forbid backslashes for line breaks
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Nikita Sobolev
- Tags flake8, flake8-plugin, linting, linter, wemake.services, code quality
- Requires: Python >=3.8, <4.0
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Nikita Sobolev
- Tags flake8, flake8-plugin, linting, linter, wemake.services, code quality
- Requires: Python >=3.8, <4.0
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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-1.0.0.tar.gz
.
File metadata
- Download URL: flake8_broken_line-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c6a17f8d9a129e99c1320fce89b33843e2963871025c4c2bb7b8b8d8732a85 |
|
MD5 | 5ced65c054fb299a50c401a3c095228e |
|
BLAKE2b-256 | 305eeca08446205afb79e74b6af8e227f06f0b1a26ae892708adbc4e65ccaa86 |
File details
Details for the file flake8_broken_line-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_broken_line-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c964336024a5030dc536a9f6fb02aa679e2d2a6b35b80a558b5136c35832a9 |
|
MD5 | 3ea8f874e48a84fc0ffea99b6a73429b |
|
BLAKE2b-256 | 31ff57d0101933527b5202cc9f80bc15aa85b207916c722a00e7adde0e33f413 |