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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17c62c0ce0d78f6fd697825bdba7a64b69a7c469bbe8d65ed68af6a63b952dfe |
|
MD5 | 3c9ee6005f6d30df5ea46109c1f8a9f2 |
|
BLAKE2b-256 | ada1a5d826a09b1d5b5856cf650fab875a48078453a0512241b69e35b0467834 |
Hashes for flake8_balanced_wrapping-0.1.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b47c8e59604f87f8c23b0ccb0530c59bf37e91aaaf33434d262f133b8ba0434 |
|
MD5 | 55b908403c8d35fcaebc9947986e51ec |
|
BLAKE2b-256 | df036f7ba0b11e60a32742016528e5c855d028da84fb992d923166fc7c1dc1ba |