mirror of https://github.com/astral-sh/ruff
## Summary This PR ensures that if a list `x` is modified within a `for` loop, we avoid flagging `list(x)` as unnecessary. Previously, we only detected calls to exactly `.append`, and they couldn't be nested within other statements. Closes https://github.com/astral-sh/ruff/issues/9925. |
||
|---|---|---|
| .. | ||
| PERF101.py | ||
| PERF102.py | ||
| PERF203.py | ||
| PERF401.py | ||
| PERF402.py | ||
| PERF403.py | ||