ruff
ddd2fc7a - [ty] Use "typeguard constraints" for two kinds of tuple narrowing (#22348)

Commit
40 days ago
[ty] Use "typeguard constraints" for two kinds of tuple narrowing (#22348) ## Summary Since we've already filtered the union in these locations, it seems like needless overhead to then intersect the previous union with the filtered union. We know what that intersection will simplify to: it will simplify to the filtered union. So rather than using a regular intersection-based constraint, we can use a "typeguard constraint", which will just directly replace the previous type with the new type instead of creating an intersection. ## Test Plan - Existing tests all pass - The primer report should be clean
Author
Parents
Loading