[ty] Fix false-positive unsupported-operator for "symmetric" TypeVars by charliermarsh · Pull Request #22756 · astral-sh/ruff (original) (raw)

@charliermarsh added bug

Something isn't working

ty

Multi-file analysis & type inference

labels

Jan 20, 2026

AlexWaygood

@charliermarsh charliermarsh changed the title[ty] Fix false-positive unsupported-operator for constrained TypeVars [ty] Fix false-positive unsupported-operator for symmetric TypeVars

Jan 21, 2026

@charliermarsh charliermarsh changed the title[ty] Fix false-positive unsupported-operator for symmetric TypeVars [ty] Fix false-positive unsupported-operator for "symmetric" TypeVars

Jan 21, 2026

dcreager

This was referenced

Jan 23, 2026

@charliermarsh

Union the return types

Add more tests

Also support unary

Limit to symmetric typevar

Simplfiy tests

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 }})