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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f91e113ec8763afc79ca860063b31c15aca24a2148459710d61bc2649c7470f |
|
MD5 | c0a920cc95fe0de1ae3afeeffbea36f9 |
|
BLAKE2b-256 | 6578a4b4e2ebb21a5cbfb4448e3026a873674be290559f6d2077526b663e3857 |
Close
Hashes for flake8_multiline_containers-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5716901e1650982e7ee6f189f2db6f8ece0da9cb5dc3928dbb77293228857122 |
|
MD5 | 3c80c1b8a39c32ee348926c92d5f22cf |
|
BLAKE2b-256 | 1885e7de2b294ca5c3f8f6e4075812b249758142dd1ff97ec292d521031f2c1a |