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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e9f03ae81041f4d56de1111ff4160231c5a661c5051523bd770c276a88ef3b6 |
|
MD5 | fc1cddffed8209c6797d3494f16fb080 |
|
BLAKE2b-256 | 13367838ba5c841b66f2d7c9a7b318152a91ed041ae56020e997b7bc22795ff8 |
Close
Hashes for flake8_multiline_containers-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4021e815310b67335974f362bd99119c210ce1f9575be628e6ddf6e31aafab0 |
|
MD5 | 18997ff09f8500d774bf0acadee4817b |
|
BLAKE2b-256 | e22b013418c1e36c870e213dd26f27c5fdce6f602dbb6c7a7b7b1c342fe89db2 |