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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a36d48f4daa010b1bf5e7b2b7c3e267752b1c211f59baef0c1f0f5879b5049f |
|
MD5 | 16c1e85bba4a01f12fd868c25b6ae79e |
|
BLAKE2b-256 | cdd614c8119e0ccb84aa5a935226a944cc538218db5280269a42a66aee6383e1 |
Close
Hashes for flake8_multiline_containers-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de0b199377c7db888c88fed71f2e5a7a1bac6c4f898eb8c0bb86880a5c4fdfd7 |
|
MD5 | f21a68e6052b54c36e6a8b2348cdfc3f |
|
BLAKE2b-256 | 7955dab768e389fe043752ec0524c51014bbfaf98ae3274c05c0a40c2bb82b6b |