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.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f316c7e8d532efdac8f6f212f57947db240c2cd914069552c890d4200a5b2afb |
|
MD5 | 550a5d97aa7e5c66bf892474c49c3cfe |
|
BLAKE2b-256 | ee683eef0ff98d0c2909b990c132e37e74f23c3fed21be85f8f9564e9b80cd57 |
Close
Hashes for flake8_multiline_containers-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae675968fab886c25f818a95eeeac79ba47adbb96a2f41c0a4aa51b4569c741 |
|
MD5 | 0ab310edc11870159ad064dc9efd27ca |
|
BLAKE2b-256 | 4b30a8b43a3c4743de2c3950a333ccebb834eb1a7a3daa47f87c956467f0b87b |