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.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c47527f1a2b0a991b876e58a2758e0ecc6b2d10a5fd4ee7740d042722f2f281 |
|
MD5 | 8298c9e70482ec2173e622aa67f9f83f |
|
BLAKE2b-256 | 41a61e29dbb4f096ea19413ca88b7f1d3d32673a3a3fa48388574b35cb259944 |
Close
Hashes for flake8_multiline_containers-0.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b684da84b401f42f1ad36f0f90e24b7f49b2691458cb582911fb99d871bb0b2 |
|
MD5 | b58eb537f22e7c08436f1c90c1d16b14 |
|
BLAKE2b-256 | 304bdaf12bc0c6733aa823cd948a2a2b3200ec926016f4ab16845558a960234f |