mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
![]() ## Summary Properly handle binary operator inference for union types. This fixes a bug I noticed while looking at ecosystem results. The MRE version of it is this: ```py def sub(x: float, y: float): # Red Knot: Operator `-` is unsupported between objects of type `int | float` and `int | float` return x - y ``` ## Test Plan - New Markdown tests. - Expected diff in the ecosystem checks |
||
---|---|---|
.. | ||
booleans.md | ||
classes.md | ||
custom.md | ||
instances.md | ||
integers.md | ||
unions.md |