ruff
03046238 - [`perflint`] Catch a wider range of mutations in `PERF101` (#9955)

Commit
1 year ago
[`perflint`] Catch a wider range of mutations in `PERF101` (#9955) ## 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.
Author
Parents
Loading