flake8-balanced-wrapping-0.1.1
توضیحات
A flake8 plugin that helps you wrap code with visual balance.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | flake8-balanced-wrapping-0.1.1 |
| نام | flake8-balanced-wrapping |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Peter Law |
| ایمیل نویسنده | PeterJCLaw@gmail.com |
| آدرس صفحه اصلی | https://github.com/PeterJCLaw/flake8-balanced-wrapping |
| آدرس اینترنتی | https://pypi.org/project/flake8-balanced-wrapping/ |
| مجوز | Apache 2.0 |
# flake8-balanced-wrapping
[](https://circleci.com/gh/PeterJCLaw/flake8-balanced-wrapping/tree/main)
A flake8 plugin that helps you wrap code with visual balance.
The aim of this linter is to complement the use of developer-assistance python
formatting tools, i.e: those where the developer remains in control of _when_ to
format code a particular way, while still enforcing a consistent style of _how_
the code is formatted.
## Style
The style which this linter checks for is one which aims for clarity and visual
balance while reducing diff noise, without concern for vertical space. This is
similar to the [`tuck`](https://pypi.org/project/tuck/) wrapping tool.
As much as possible this linter will not duplicate checks provided by other
plugins where they are are in agreement.
**Example**: Function definitions
``` python
# Unwrapped
def foo(bar: str, quox: int = 0) -> float:
return 4.2
# Wrapped
def foo(
bar: str,
quox: int = 0,
) -> float:
return 4.2
```
**Example**: List comprehension
``` python
# Unwrapped
[x for x in 'aBcD' if x.isupper()]
# Wrapped
[
x
for x in 'aBcD'
if x.isupper()
]
```
نیازمندی
| مقدار | نام |
|---|---|
| <3,>=2.1.0 | asttokens |
| <0.3,>=0.2 | tuck |
نحوه نصب
نصب پکیج whl flake8-balanced-wrapping-0.1.1:
pip install flake8-balanced-wrapping-0.1.1.whl
نصب پکیج tar.gz flake8-balanced-wrapping-0.1.1:
pip install flake8-balanced-wrapping-0.1.1.tar.gz