Skip to main content

Ensure a consistent format for multiline containers.

Project description

PyPI PyPI - Python Version https://travis-ci.org/jsfehler/flake8-multiline-containers.svg?branch=master

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-multiline-containers-0.0.5.tar.gz (4.0 kB view details)

Uploaded Source

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

Hashes for flake8-multiline-containers-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5e56e24aa97fb5a0de532b6d5c1ece39c04ee007a2e2d8c5b5ae770edf03b311
MD5 de4d175c37fcd826908d41d3e1eb5042
BLAKE2b-256 45cad9bb59656b31e3e0d3bcd7c9698f4bdd88914e7e802ad75d9ea2f97e6704

See more details on using hashes here.

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

Hashes for flake8_multiline_containers-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 97935e06152a6e3f4df5f56441c9e42c7521ca0916915004e5c62ae55ab2298d
MD5 2f4f845f2075e5b274152460b19498b2
BLAKE2b-256 e41fb66ef9c6747362d61274400b2ead9ff58db4a6725c56ba1022575d3cfdaf

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page