A flake8 plugin to disallow nested comprehensions
Project description
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
Release history Release notifications | RSS feed
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
- Download URL: flake8_no_nested_comprehensions-1.0.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79ee82a48850cce9fe3ba478cf06205dcfc6d48f3b6eb32b17c7d12648422ec0 |
|
MD5 | fa564fdfe83e899ca6573dceeabf5224 |
|
BLAKE2b-256 | 364517d84f552ea94d86b60c9ca06dc445e0ad9252c151d999878e67d803c9c6 |
File details
Details for the file flake8_no_nested_comprehensions-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_no_nested_comprehensions-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3bd352fbe56455f4a2f3bbd7df3307eb1d4764e157c68f4e603d3e662297b4 |
|
MD5 | a9e2d82645a9a31d9db52eb0a462a47c |
|
BLAKE2b-256 | 060db5b489c1e1ecfaaac452470c30ee067ffb81f87abd0e42259c3661d8e924 |