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
File details
Details for the file flake8-multiline-containers-0.0.5.tar.gz
.
File metadata
- Download URL: flake8-multiline-containers-0.0.5.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e56e24aa97fb5a0de532b6d5c1ece39c04ee007a2e2d8c5b5ae770edf03b311 |
|
MD5 | de4d175c37fcd826908d41d3e1eb5042 |
|
BLAKE2b-256 | 45cad9bb59656b31e3e0d3bcd7c9698f4bdd88914e7e802ad75d9ea2f97e6704 |
Provenance
File details
Details for the file flake8_multiline_containers-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: flake8_multiline_containers-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97935e06152a6e3f4df5f56441c9e42c7521ca0916915004e5c62ae55ab2298d |
|
MD5 | 2f4f845f2075e5b274152460b19498b2 |
|
BLAKE2b-256 | e41fb66ef9c6747362d61274400b2ead9ff58db4a6725c56ba1022575d3cfdaf |