mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
![]() 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`. |
||
---|---|---|
.. | ||
docs | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
README.md |
Red Knot
Red Knot is an extremely fast type checker. Currently, it is a work-in-progress and not ready for user testing.
Red Knot is designed to prioritize good type inference, even in unannotated code, and aims to avoid false positives.
While Red Knot will produce similar results to mypy and pyright on many codebases, 100% compatibility with these tools is a non-goal. On some codebases, Red Knot's design decisions lead to different outcomes than you would get from running one of these more established tools.
Contributing
Core type checking tests are written as Markdown code blocks.
They can be found in red_knot_python_semantic/resources/mdtest
.
See red_knot_test/README.md
for more information
on the test framework itself.
The list of open issues can be found here.