Skip to main content

Ensure a consistent format for multiline containers.

Project description

PyPI PyPI - Python Version GitHub Updates Build status

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.19.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: flake8-multiline-containers-0.0.19.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for flake8-multiline-containers-0.0.19.tar.gz
Algorithm Hash digest
SHA256 7c47527f1a2b0a991b876e58a2758e0ecc6b2d10a5fd4ee7740d042722f2f281
MD5 8298c9e70482ec2173e622aa67f9f83f
BLAKE2b-256 41a61e29dbb4f096ea19413ca88b7f1d3d32673a3a3fa48388574b35cb259944

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flake8_multiline_containers-0.0.19-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for flake8_multiline_containers-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 1b684da84b401f42f1ad36f0f90e24b7f49b2691458cb582911fb99d871bb0b2
MD5 b58eb537f22e7c08436f1c90c1d16b14
BLAKE2b-256 304bdaf12bc0c6733aa823cd948a2a2b3200ec926016f4ab16845558a960234f

See more details on using hashes here.

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