A flake8 plugin that helps you wrap code with visual balance.
Project description
flake8-balanced-wrapping
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
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
# 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
# Unwrapped
[x for x in 'aBcD' if x.isupper()]
# Wrapped
[
x
for x in 'aBcD'
if x.isupper()
]
Project details
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
Hashes for flake8-balanced-wrapping-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8e71e02942671f898e83bd740c80f2e44944fca3d5164f4e2ee9ce737f3db9f |
|
MD5 | 45b7b707dfab10630053cbcef8348381 |
|
BLAKE2b-256 | 47a3fdbaaccfef66648a877786229cb371f1f053d47b474559a9a884891c5aa9 |
Hashes for flake8_balanced_wrapping-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ef6e9031ce50623750dfafb960315d18614f71626dcaacd3bcdf39fee47982 |
|
MD5 | 7eabea95c5bad8f3a1078dae2e66edee |
|
BLAKE2b-256 | 491eb04dce5c1f579a6d0c4f2e8b405d299dbd8fe9fa44f2ab285ff96c4e4bc4 |