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.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee1f8411398d303a6d8ea1b2ab99e4e89b03bd366f1d093af4920b33ca1c4aeb |
|
MD5 | 880f1c6f7af958683d9c7a0a47c2f0c9 |
|
BLAKE2b-256 | b4e9bc0b7d6e0a28c16eb75668f56208422c678a3c4f994482aed5b0205803a9 |
Close
Hashes for flake8_multiline_containers-0.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 590d2fe0ca38ece386bf936334b83278497ce36fe9ea3ba51415aae481ab49a8 |
|
MD5 | 5ca254b03068130b148f828e16000f29 |
|
BLAKE2b-256 | 4909141319a92885cbcd5fe0e47e3f5dcec1b689b482c69987bfea52c0dd7eb6 |