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

flake8_no_nested_comprehensions-1.0.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

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