ruff/crates/ruff_linter/resources/test/fixtures/perflint
w0nder1ng 9c0772d8f0
[`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()`.
2025-04-21 13:29:24 -04:00
..
PERF101.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
PERF102.py Add padding in `PERF102` fixes (#7554) 2023-09-20 19:33:54 -04:00
PERF203.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
PERF401.py [`perflint`] Allow list function calls to be replaced with a comprehension (`PERF401`) (#17519) 2025-04-21 13:29:24 -04:00
PERF402.py Ignore list-copy recommendations for async `for` loops (#11250) 2024-05-02 11:48:52 -07:00
PERF403.py [`perflint`] Implement fix for `manual-dict-comprehension` (`PERF403`) (#16719) 2025-04-18 13:10:40 -04:00