SIGN IN SIGN UP
astral-sh / ruff UNCLAIMED

An extremely fast Python linter and code formatter, written in Rust.

0 0 36 Rust

[ty] Use ThinVec for sparse kwargs bindings (#25457)

## Summary

`multi_bindings_by_use` is only populated for kwargs expressions (like
`f(**options)`), so it is empty or very small for most scopes. This PR
keeps the mutable hash map while building the use-def map, then converts
it into a sorted `ThinVec` for storage, which is much smaller
(especially when empty). Lookups use binary search by `ScopedUseId`.
C
Charlie Marsh committed
d475a239bb5c5f5ace5a2b3d995c2710fcfa08c8
Parent: ec1d535
Committed by GitHub <noreply@github.com> on 5/29/2026, 4:33:18 PM