ruff/crates/ruff
qdegraaf 34e8de738e
[perflint] Expand PERF401 and PERF402 with type checks (#6994)
## Summary

Attempt at a small improvement to two `perflint` rules using the new
type inference capabilities to only flag `PERF401` and `PERF402` for
values we infer to be lists. This makes the rule more conservative, as
it only flags values that we _know_ to be lists, but it's overall a
desirable change, as it favors false negatives over false positives for
a "nice-to-have" rule.

Closes https://github.com/astral-sh/ruff/issues/6995.

## Test Plan

Add non-list value cases and make sure all old cases are still caught.
2023-08-29 19:15:29 -04:00
..
resources/test [perflint] Expand PERF401 and PERF402 with type checks (#6994) 2023-08-29 19:15:29 -04:00
src [perflint] Expand PERF401 and PERF402 with type checks (#6994) 2023-08-29 19:15:29 -04:00
Cargo.toml Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00