mirror of https://github.com/astral-sh/ruff
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()`. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| package | ||
| project | ||
| __init__.py | ||
| disallowed_rule_names.txt | ||