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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | df02de56d720646e2df951a51af578c92693b2668a873d5abfd62b32a6718be5 |
|
MD5 | 0f1bb3e5b5b01aa41cf7fb00895fec83 |
|
BLAKE2b-256 | 88ab0431efa4b36a9c400391cab0e0e94f70a395c8b37aa259871f0e80178a97 |
Close
Hashes for flake8_multiline_containers-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09b06d67affd8e2f0a6aa304bd6577a690ecb4f1f7a61d9236f4c6d1879fc43 |
|
MD5 | cd8d653d5297ca51ed908209c4217969 |
|
BLAKE2b-256 | d585183943fb89bbb19f45815aa65292b754bdd136cba428152c40e39ed88cf1 |