ruff
c6dcfe36 - [ty] introduce multiline pretty printer (#19979)

Commit
30 days ago
[ty] introduce multiline pretty printer (#19979) Requires some iteration, but this includes the most tedious part -- threading a new concept of DisplaySettings through every type display impl. Currently it only holds a boolean for multiline, but in the future it could also take other things like "render to markdown" or "here's your base indent if you make a newline". For types which have exposed display functions I've left the old signature as a compatibility polyfill to avoid having to audit everywhere that prints types right off the bat (notably I originally tried doing multiline functions unconditionally and a ton of things churned that clearly weren't ready for multi-line (diagnostics). The only real use of this API in this PR is to multiline render function types in hovers, which is the highest impact (see snapshot changes). Fixes https://github.com/astral-sh/ty/issues/1000
Author
Parents
Loading