ruff/crates/red_knot/src
Andrew Gallant 718b0cadf4 ruff_db: switch diagnostic rendering over to `std::fmt::Display`
It was already using this approach internally, so this is "just" a
matter of rejiggering the public API of `Diagnostic`.

We were previously writing directly to a `std::io::Write` since it was
thought that this worked better with the linear typing fakery. Namely,
it increased confidence that the diagnostic rendering was actually
written somewhere useful, instead of just being converted to a string
that could potentially get lost.

For reasons discussed in #17130, the linear type fakery was removed.
And so there is less of a reason to require a `std::io::Write`
implementation for diagnostic rendering. Indeed, this would sometimes
result in `unwrap()` calls when one wants to convert to a `String`.
2025-04-02 11:01:16 -04:00
..
args.rs Allow discovery of venv in VIRTUAL_ENV env variable (#16853) 2025-03-20 13:55:35 +00:00
logging.rs Remove linter dependency from red_knot_server (#13028) 2024-08-21 10:02:42 +00:00
main.rs ruff_db: switch diagnostic rendering over to `std::fmt::Display` 2025-04-02 11:01:16 -04:00
python_version.rs Use `ast::PythonVersion` internally in the formatter and linter (#16170) 2025-02-18 12:03:13 -05:00
version.rs [red-knot] Add version command (#15823) 2025-02-02 18:56:51 +00:00