Derived from the refurb linter.
Fix is sometimes available.
This rule is unstable and in preview. The
--preview flag is required for use.
What it does#
Checks for generator expressions, list and set comprehensions that can
be replaced with
Why is this bad?#
When unpacking values from iterators to pass them directly to
a function, prefer
itertools.starmap is more concise and readable. Furthermore, it is
more efficient than generator expressions, and in some versions of Python,
it is more efficient than comprehensions.