[ty] Avoid caching trivial member lookups by charliermarsh · Pull Request #25661 · astral-sh/ruff (original) (raw)
Summary
member_lookup_with_policy currently creates and retains a Salsa query even when the result is known before attribute lookup: for __class__, and for dynamic, divergent, and Never types.
This change handles those cases before entering the tracked query. Materialized divergent fallbacks and the existing __class__ ordering are preserved; all other lookups continue through the unchanged tracked implementation.