Skip to main content

Ensure a consistent format for multiline containers.

Project description

PyPI PyPI - Python Version GitHub Updates 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.14.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flake8-multiline-containers-0.0.14.tar.gz.

File metadata

  • Download URL: flake8-multiline-containers-0.0.14.tar.gz
  • Upload date:
  • Size: 5.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.14.tar.gz
Algorithm Hash digest
SHA256 2dc64612c1904f73d403d45bbea36659afc2f4b5e7c5b051966ca540f9b5bbe8
MD5 1cd10e0ddc2761108fab2eeb70c7b6e5
BLAKE2b-256 5c2b07dc7ae4318e6e9f930f04f2d99fa04b0469e20d0f888be8ba8d901a4e95

See more details on using hashes here.

Provenance

File details

Details for the file flake8_multiline_containers-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: flake8_multiline_containers-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 7.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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5b95e333cb9e76cecd6bd9ec1593f91960a334a25c50874e62beaa8f1f3b57
MD5 7e3e45f1444e535a1c4f5bf4c07ac695
BLAKE2b-256 06d309ab59d3e5c5d2927adf8805c24f08dc8a570353b624f7a51adb88c1d7c0

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