Ensure a consistent format for multiline containers.
Project description
A Flake8 plugin to ensure a consistent format for multiline containers.
Installation
Install from pip with:
pip install flake8-multiline-containers
Rules
Code |
Rule |
---|---|
JS101 |
Multi-line container not broken after opening character |
JS102 |
Multi-line container does not close on same column as opening |
Examples
# Right: Opens and closes on same line
foo = {'a': 'hello', 'b': 'world'}
# Right: Line break after parenthesis, closes on same column as opening
foo = {
'a': 'hello',
'b': 'world',
}
# Right: Line break after parenthesis, closes on same column as opening
foo = [
'hello', 'world',
]
# Wrong: JS101
foo = {'a': 'hello',
'b': 'world',
}
# Wrong: JS101, JS102
foo = {'a': 'hello',
'b': 'world'}
# Wrong: JS101, JS102
foo = {'hello',
'world'
}
Project details
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
Close
Hashes for flake8-multiline-containers-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4174ca2ec10c1538d4afe394fdd0d20e8407a4eadb8acc35b29a88ee637891fa |
|
MD5 | 73c36ffa03e71321bfa5d7d81ac1d3ab |
|
BLAKE2b-256 | 0ce28c0461e947d7bff9277671772d0a94eed0703c7b650f119864f1e5f4c443 |
Close
Hashes for flake8_multiline_containers-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57dd03b176ea219534d0acb0eeeb8d33900a7f261eca5ac7e6554572c43399ac |
|
MD5 | e80a2134f12c198aa63378eba1378119 |
|
BLAKE2b-256 | 60ac77a88ca182dc33d337accfeb642e902d74dc2a8f5ca4f9e337dce409bec0 |