ruff
dc1ed8e5 - Render subdiagnostics in the Ruff/ty playgrounds (#25490)

Commit
54 days ago
Render subdiagnostics in the Ruff/ty playgrounds (#25490) ## Summary @decorator-factory [said](https://discord.com/channels/267624335836053506/891788761371906108/1510258224719204352) on the Python community Discord that > Maybe better error messages are a good reason to recommend pyright over other things. It turns out they'd been evaluating ty's diagnostics purely on the diagnostics they could see in the ty playground. That seems a bit of a shame, since we've improved our diagnostics a lot recently thanks to @sharkdp's excellent work -- but none of those improvements are visible in the playground right now, as the playground doesn't render any subdiagnostics currently! This PR adds subdiagnostics to the Ruff and ty playgrounds: both in the "diagnostics" panel at the bottom of the playground, and in the tooltip rendering when you hover over a line with a diagnostic. In both cases, subdiagnostics with annotations are clickable, allowing you to jump straight to the line of code being annotated (even if it's in another file, even if that file is a vendored typeshed stub). Obviously I'm very much not a frontend developer; this patch was very much Codex-driven. I manually tested it, however, and did several `/review` and `$simplify` rounds with Codex before submitting this. ## Test Plan https://github.com/user-attachments/assets/3418d337-0f34-4e9f-8203-3da2f2008b86
Author
Parents
Loading