ruff
9c0772d8 - [`perflint`] Allow list function calls to be replaced with a comprehension (`PERF401`) (#17519)

Commit
233 days ago
[`perflint`] Allow list function calls to be replaced with a comprehension (`PERF401`) (#17519) This is an implementation of the discussion from #16719. This change will allow list function calls to be replaced with comprehensions: ```python result = list() for i in range(3): result.append(i + 1) # becomes result = [i + 1 for i in range(3)] ``` I added a new test to `PERF401.py` to verify that this fix will now work for `list()`.
Author
Parents
Loading