ruff
aa96a05d - [`perflint`] Clarify that `PERF402` applies to any iterable (#26242)

Commit
80 days ago
[`perflint`] Clarify that `PERF402` applies to any iterable (#26242) First contribution here, hi! Picking up #21593 as a small intro PR. PERF402's current "What it does" says it catches copies of an "existing list", but the rule also fires whenever a `for` loop appends every item of any iterable to a list while the source isn't required to be a list (only the destination is). The issue reporter pointed this out and suggested wording closer to "for loops that can be replaced with `list()`", which is what I went with here. Scope is intentionally tiny: just the `## What it does` and `## Why is this bad?` doc comments. Violation message, example, rule logic, and tests are unchanged so no snapshots move. Closes #21593.
Author
Parents
Loading