Skip to main content

A flake8 plugin to disallow nested comprehensions

Project description

build status pre-commit.ci status

flake8-no-nested-comprehensions

flake8 plugin which forbids nested comprehensions

installation

pip install flake8-no-nested-comprehensions

flake8 codes

Code Description
CMP100 do not use nested comprehensions

rationale

I don't like them. If you need them for performance you can put a # noqa: CMP100 and preferrably put a comment in explaining it.

as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pycqa/flake8
    rev: 3.8.1
    hooks:
    -   id: flake8
        additional_dependencies: [flake8-no-nested-comprehensions==1.0.0]

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

Built Distribution

File details

Details for the file flake8_no_nested_comprehensions-1.0.0.tar.gz.

File metadata

File hashes

Hashes for flake8_no_nested_comprehensions-1.0.0.tar.gz
Algorithm Hash digest
SHA256 79ee82a48850cce9fe3ba478cf06205dcfc6d48f3b6eb32b17c7d12648422ec0
MD5 fa564fdfe83e899ca6573dceeabf5224
BLAKE2b-256 364517d84f552ea94d86b60c9ca06dc445e0ad9252c151d999878e67d803c9c6

See more details on using hashes here.

File details

Details for the file flake8_no_nested_comprehensions-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_no_nested_comprehensions-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b3bd352fbe56455f4a2f3bbd7df3307eb1d4764e157c68f4e603d3e662297b4
MD5 a9e2d82645a9a31d9db52eb0a462a47c
BLAKE2b-256 060db5b489c1e1ecfaaac452470c30ee067ffb81f87abd0e42259c3661d8e924

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