[ty] Fix unary and comparison operators for TypeVars with union bounds by carljm · Pull Request #22925 · astral-sh/ruff (original) (raw)

@carljm added the ty

Multi-file analysis & type inference

label

Jan 28, 2026

@carljm carljm marked this pull request as ready for review

January 28, 2026 19:17

@carljm

This fixes an issue where comparison and unary operators were incorrectly flagged as unsupported for TypeVars with union bounds (e.g., bound=float which becomes int | float).

Fixes astral-sh/ty#2652

charliermarsh

@carljm carljm deleted the cjm/typevar-bound-union-compare branch

January 28, 2026 23:52

carljm added a commit that referenced this pull request

Jan 30, 2026

@carljm

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})