ruff
701f5134 - [ty] Only consider fully static pivots when deriving transitive constraints (#22444)

Commit
18 days ago
[ty] Only consider fully static pivots when deriving transitive constraints (#22444) When working with constraint sets, we track transitive relationships between the constraints in the set. For instance, in `S ≤ int ∧ int ≤ T`, we can infer that `S ≤ T`. However, we should only consider fully static types when looking for a "pivot" for this kind of transitive relationship. The same pattern does not hold for `S ≤ Any ∧ Any ≤ T`; because the two `Any`s can materialize to different types, we cannot infer that `S ≤ T`. Fixes https://github.com/astral-sh/ty/issues/2371
Author
Parents
Loading