mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-08 20:58:05 +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 |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |