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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cb75c68fb1d33c140e3a5793daca242c2a2c5298701bda385ee4fa7dc950c21 |
|
MD5 | c6593790419b3be2dc4308569e4579dd |
|
BLAKE2b-256 | f0a49d879e73cf37c9d990e552f78be40119df31e6da5ca9c32f1d4b56334f43 |
Close
Hashes for flake8_multiline_containers-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6513326c8c692e6881cc24c01400f4605208f65b725ff77f7af0fd30d0594f14 |
|
MD5 | f649e2ef0968a097d1b0223c359438d2 |
|
BLAKE2b-256 | f5080d42e2f6d56748a7231185f08ac5b08f98310252140d4a46db129c413a17 |