ruff
be3bfeeb - [ty] Include constraint-set assignability in more checks (#28642)

Commit
8 days ago
[ty] Include constraint-set assignability in more checks (#28642) ## Summary This PR is inspired by https://github.com/astral-sh/ruff/pull/28638 by @ibraheemdev. I think the two type-relation checks which are adapted here have the same problem: they previously only applied for eager assignability checks, but they should hold for all assignability checks (lazy / constraint-set assignability). We could add mdtests like the following, but I'm not sure if we really want to? This just feels like an oversight, and I don't really want to duplicate all assignability tests (and check with `is_assignable_to` and `is_constraint_set_assignable_to`): ```py from typing import Any from ty_extensions import Intersection, Not, static_assert from ty_extensions._internal import is_assignable_to, is_constraint_set_assignable_to static_assert(is_assignable_to(Intersection[Any, Not[int]], int)) static_assert(is_constraint_set_assignable_to(Intersection[Any, Not[int]], int)) # fails on main, succeeds on this branch ``` ## Test Plan Manually tested
Author
Parents
Loading