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.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a98dd4688e8de3f2494fd94fee52d84b404f5a9259a8945514d042ba2238c9dc |
|
MD5 | 1144d226139c3f6b7835c010e5337f22 |
|
BLAKE2b-256 | e5b410d52deb774061f6a083c70eba834ecd5e85604bbee005021ff80981589b |
Close
Hashes for flake8_multiline_containers-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f3818e47fa550b98be48c456edf553ac8ee610f8beaef67b90973071e391c78 |
|
MD5 | 3e6b24d653ad44cef1bf02a9ed9f3a78 |
|
BLAKE2b-256 | 2725cddfa22db8b6208e14d946b87e18f3625ece67937c7a838ba4abaeebe49f |