Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 337 Bytes

unnecessary-comprehension.md

File metadata and controls

19 lines (12 loc) · 337 Bytes

Pattern: Unnecessary comprehension

Issue: -

Description

Emitted when pylint finds list-, set- or dict-comprehensions, that are unnecessary and can be rewritten with the list-, set- or dict-constructors.

Example of incorrect code:

[x for x in iterable]

Example of correct code:

list(iterable)