* main: (30 commits)
[red-knot] Silence `unresolved-import` in unreachable code (#17336)
red_knot_python_semantic: move TODO comment
red_knot_python_semantic: rename `lint()` and `report()`
ruff_db: use `Annotation::get_message` in more places
red_knot_python_semantic: tweak docs on building reporter builders
red_knot_python_semantic: remove the "old" secondary message type
red_knot_python_semantic: replace one use of "old" secondary diagnostic messages
red_knot_python_semantic: update revealed type snapshots
ruff_db: tweak how the revealed type diagnostic is rendered
red_knot: add explicit test for concise `reveal_type` diagnostic
red_knot_python_semantic: remove `InferContext::report_diagnostic`
red_knot_python_semantic: add "reporter" API
Bump 0.11.5 (#17337)
[red-knot] Silence `unresolved-attribute` in unreachable code (#17305)
Revert "[red-knot] Type narrowing for assertions (#17149)" (#17335)
[red-knot] Type narrowing for assertions (#17149)
[red-knot] avoid unnecessary evaluation of visibility constraint on definitely-unbound symbol (#17326)
update cargo-dist (#17325)
[red-knot] Fix double hovers/inlays in playground (#17334)
[red-knot] Track reachability of scopes (#17332)
...
Summary
Basically just repeat the same thing that we did for
unresolved-reference, but now for attribute expressions.We now also handle the case where the unresolved attribute (or the unresolved reference) diagnostic originates from a stringified type annotation.
And I made the evaluation of reachability constraints lazy (will only be evaluated right before we are about to emit a diagnostic).
Test Plan
New Markdown tests for stringified annotations.