[ty] Emit more specific diagnostics for "possibly unbound" errors from context manager dunder methods invoked on a union. by lerebear · Pull Request #24662 · astral-sh/ruff (original) (raw)
lerebear marked this pull request as ready for review
lerebear deleted the lerebear/push-tuskvpoxpzyx branch
lerebear added a commit that referenced this pull request
…nd errors from implicit dunder calls against unions. (#24676)
Summary
Building on #24662, and to resolve
astral-sh/ty#940, this adds more "info"
sub-diagnostics to possibly unbound method error messages that occur
when a dunder is called implicitly against a union type. The implicit
dunder calls covered here are __iter__, __await__ and
__mro_entries__.
Test Plan
Please see new/updated mdtests and related snapshots.
This was referenced
Apr 27, 2026
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 }})