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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc64612c1904f73d403d45bbea36659afc2f4b5e7c5b051966ca540f9b5bbe8 |
|
MD5 | 1cd10e0ddc2761108fab2eeb70c7b6e5 |
|
BLAKE2b-256 | 5c2b07dc7ae4318e6e9f930f04f2d99fa04b0469e20d0f888be8ba8d901a4e95 |
Close
Hashes for flake8_multiline_containers-0.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e5b95e333cb9e76cecd6bd9ec1593f91960a334a25c50874e62beaa8f1f3b57 |
|
MD5 | 7e3e45f1444e535a1c4f5bf4c07ac695 |
|
BLAKE2b-256 | 06d309ab59d3e5c5d2927adf8805c24f08dc8a570353b624f7a51adb88c1d7c0 |