Derived from the flake8-comprehensions linter.
Fix is always available.
What it does#
Checks for unnecessary
Why is this bad?#
It's unnecessary to use a
set comprehension to build a
data structure if the elements are unchanged. Wrap the iterable with
This rule's fix is marked as unsafe, as it may occasionally drop comments when rewriting the comprehension. In most cases, though, comments will be preserved.