mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +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 |
||
---|---|---|
.. | ||
mdtest | ||
README.md |
Markdown files within the mdtest/
subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs
integration test.
See crates/red_knot_test/README.md
for documentation of this test format.