ruff
754ce140 - [ty] Optimize reachability by replacing `.is_equivalent_to(...) || .is_subtype_of(...)` with `.is_pure_redundant_with(...)` (#31000)

Commit
13 hours ago
[ty] Optimize reachability by replacing `.is_equivalent_to(...) || .is_subtype_of(...)` with `.is_pure_redundant_with(...)` (#31000) ## Summary Checking whether a type `X` is redundant with `Y` or a subtype of `Y` should be the same as checking whether `X` is pure-redundant with `Y`. Codex is able to find one edge case locally where this changes behaviour, but it seems unlikely to come up in real life (it doesn't show up in the ecosystem report on this PR!), and appears to be a pre-existing issue, from what I can tell. In theory this should be more efficient. In practice, codspeed is a wash. Nonetheless, this simplifies the code as well, so I think it's worth doing.
Author
Parents
Loading