You must login to view /lordwelch/router7/commit/f8d79d0ecc94760d5a3f9f9847e3f77f604b442d?style=split&whitespace=ignore-eol.
The GitHub option should be usable for most people, it only links via username.
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]
Languages
Python
100%