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.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2082a1786a4ceed4f6607fc66ee604ddf0dff2133ecd3ae8375d0802fe18ffb9 |
|
MD5 | 265e3d514fd77b6317a2fd12d7365533 |
|
BLAKE2b-256 | 81bbe65ca83cdfe697facde295bb271adc4cdfef3d4b15f9dc0365c24a0ccb96 |
Close
Hashes for flake8_multiline_containers-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e818499ff592a218c089a034e98cfe7f0c674593347723ae0d94253f3e7e2c7 |
|
MD5 | abd45a20477348927f68e52d5abe8726 |
|
BLAKE2b-256 | f087f544edb51b912655d817241cfd1b0a591b7c03610a5f59f87db4cfd3759c |