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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e56e24aa97fb5a0de532b6d5c1ece39c04ee007a2e2d8c5b5ae770edf03b311 |
|
MD5 | de4d175c37fcd826908d41d3e1eb5042 |
|
BLAKE2b-256 | 45cad9bb59656b31e3e0d3bcd7c9698f4bdd88914e7e802ad75d9ea2f97e6704 |
Close
Hashes for flake8_multiline_containers-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97935e06152a6e3f4df5f56441c9e42c7521ca0916915004e5c62ae55ab2298d |
|
MD5 | 2f4f845f2075e5b274152460b19498b2 |
|
BLAKE2b-256 | e41fb66ef9c6747362d61274400b2ead9ff58db4a6725c56ba1022575d3cfdaf |