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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | daa85e99009da8cc53a3f6bfeec71d36e97241df6fae77e26ffc1549520b4530 |
|
MD5 | bb7488d1642bbf943c17bbad6233534d |
|
BLAKE2b-256 | 1b0221a8567ddba02d10420439cdfa2ceb8a4ff07b1b1ee16ea44bf39d352765 |
Close
Hashes for flake8_multiline_containers-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aafe28c02d2dae6840b580c8d06ca4388765a1d61cd1cdbb1197b834b99a687 |
|
MD5 | 1ecd37d6fc0f0e8501dd25a75d6be2e2 |
|
BLAKE2b-256 | 6855dac19a953fedd321b4df4f26b410270717e5f2a7ced1d0b2cd5dd384307b |