Flake8 plugin that helps you write better list/set/dict comprehensions
53.84 KB
built 2026-10-17 09:23:50 GMT
Description
A flake8 plugin to identify the following patterns:
- C400-402: Unnecessary generator - rewrite as a <list/set/dict> comprehension.
- C403-404: Unnecessary list comprehension - rewrite as a <set/dict>
comprehension.
- C405-406: Unnecessary <list/tuple> literal - rewrite as a <set/dict> literal.
- C408: Unnecessary <dict/list/tuple> call - rewrite as a literal.
- C409-410: Unnecessary <list/tuple> passed to <list/tuple>() - (remove the
outer call to <list/tuple>``()/rewrite as a ``<list/tuple> literal).
- C411: Unnecessary list call - remove the outer call to list().
- C412: Unnecessary <dict/list/set> comprehension - in can take a generator.
- C413: Unnecessary <list/reversed> call around sorted().
- C414: Unnecessary <list/reversed/set/sorted/tuple> call within
<list/set/sorted/tuple>().
- C415: Unnecessary subscript reversal of iterable within
<reversed/set/sorted>().
- C416: Unnecessary <list/set> comprehension - rewrite using <list/set>().
- C417: Unnecessary map usage - rewrite using a generator
expression/<list/set/dict> comprehension.
- C418: Unnecessary <dict/dict comprehension> passed to dict() - remove the
outer call to dict().
- C419 Unnecessary list comprehension in <any/all>() prevents short-
circuiting - rewrite as a generator.
- C420: Unnecessary dict comprehension - rewrite using dict.fromkeys().
Dependencies
13 totalRequires12
- ((python3dist(flake8) < 3.2 or python3dist(flake8) > 3.2) with python3dist(flake8) >= 3)
- (python3dist(tomli) if python3-devel < 3.11)
- pyproject-rpm-macros
- python3-devel
- python3-devel
- python3dist(packaging)
- python3dist(pip) >= 19
- python3dist(setuptools) >= 77
- rpmlib(CompressedFileNames) <= 3.0.4-1
- rpmlib(DynamicBuildRequires) <= 4.15.0-1
- rpmlib(FileDigests) <= 4.6.0-1
- rpmlib(RichDependencies) <= 4.12.0-1
Provides1
- python3-flake8-comprehensions = 3.17.0-5.fc45
ObsoletesNo Obsoletes
ConflictsNo Conflicts
RecommendsNo Recommends
SuggestsNo Suggests
SupplementsNo Supplements
EnhancesNo Enhances
Files
3Name ![]() |
Size |
|---|---|
| flake8-comprehensions-3.17.0.tar.gz | 21.87 KB |
| pep639.patch | 1.03 KB |
| python-flake8-comprehensions.spec | 5.14 KB |
Files 1–3 of 3
Component of
buildroots that installed this RPMNo Buildroots
