ruff
f85ea1bf - [red-knot] Ensure differently ordered unions and intersections are understood as equivalent even inside arbitrarily nested tuples (#15740)

Commit
343 days ago
[red-knot] Ensure differently ordered unions and intersections are understood as equivalent even inside arbitrarily nested tuples (#15740) ## Summary On `main`, red-knot: - Considers `P | Q` equivalent to `Q | P` - Considered `tuple[P | Q]` equivalent to `tuple[Q | P]` - Considers `tuple[P | tuple[P | Q]]` equivalent to `tuple[tuple[Q | P] | P]` - ‼️ Does _not_ consider `tuple[tuple[P | Q]]` equivalent to `tuple[tuple[Q | P]]` The key difference for the last one of these is that the union appears inside a tuple that is directly nested inside another tuple. This PR fixes this so that differently ordered unions are considered equivalent even when they appear inside arbitrarily nested tuple types. ## Test Plan - Added mdtests that fails on `main` - Checked that all property tests continue to pass with this PR
Author
Parents
Loading