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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 478cbf6b08787ea37f2bffd3ae045fb15e73dee7eb1aa62acc2027d0979606b1 |
|
MD5 | f8b121a657d1bb1bc38bfd1e23cc359b |
|
BLAKE2b-256 | 0fb73145b67cddcfeeea7a42dfba70f0d5621b8810851c9af28c394e15b7497e |
Close
Hashes for flake8_multiline_containers-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 933bd86fe4e23d53ce6c63fea176bbd9f86d8dd91664b4daaecb76bc69b02c2c |
|
MD5 | e36e2ebda928ba4d45f08f374d2424a3 |
|
BLAKE2b-256 | 6367e44a94985f1f69586cf8be0ce9ee802427bfba82aa9bd15271d2b520b215 |