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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb385218eb84c241d2951d3bb38439acafcde999b1d35b264b558faf2114a725 |
|
MD5 | d5f604f8b237daf1464926fe4f48a323 |
|
BLAKE2b-256 | 5914396aa70d71e0ee60247a4f0681788d423cdf7cf0c20028b5fbf6ce44e52b |
Close
Hashes for flake8_multiline_containers-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c253c24b834f2b31aabd14d4b6cfa16f8d0406fbbcd4ab93ae70c423313c1a54 |
|
MD5 | edb190e391eed906b95f7d4f9c2b7ae6 |
|
BLAKE2b-256 | b34b82cad35c685b53994b3cc4f9b97702a920b89bb234b8cead7ef702b3fc37 |