You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48dcdd0
Browse filesBrowse the repository at this point in the historyBrowse files
[ty] Restrict range implications from gradual equivalence (astral-sh#29577)
Fix false `invalid-argument-type` errors when inferring constrained type
variables from callbacks that return an invariant generic with a gradual
type argument. A callback returning `Box[Any]` can satisfy `Callable[[],
T | Box[T]]` when `T` is constrained to `str` or `bytes`.
The solver treated equivalence to a gradual type as exact substitution,
allowing a valid union alternative to imply an incompatible bound.
Require a static equivalence bound before deriving either lower- or
upper-bound implications, including when gradual types are nested inside
a bound.
Prerequisite to avoid regressions in astral-sh#29236.
0 commit comments