ruff/crates/red_knot
Charlie Marsh af60d539ab
Move sub-crates to workspace dependencies (#11407)
## Summary

This matches the setup we use in `uv` and allows for consistency in the
`Cargo.toml` files.
2024-05-13 14:37:50 +00:00
..
src [red-knot] @override lint rule (#11282) 2024-05-09 09:25:08 -06:00
vendor/typeshed [red-knot] Vendor typeshed's stdlib (#11340) 2024-05-09 12:44:53 +01:00
Cargo.toml Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
README.md [red-knot] Vendor typeshed's stdlib (#11340) 2024-05-09 12:44:53 +01:00

README.md

Red Knot

The Red Knot crate contains code working towards multifile analysis, type inference and, ultimately, type-checking. It's very much a work in progress for now.

Vendored types for the stdlib

Red Knot vendors typeshed's stubs for the standard library. The vendored stubs can be found in crates/red_knot/vendor/typeshed. The file crates/red_knot/vendor/typeshed/source_commit.txt tells you the typeshed commit that our vendored stdlib stubs currently correspond to.

Updating the vendored stubs is currently done manually. On a Unix machine, follow the following steps (if you have a typeshed clone in a typeshed directory, and a Ruff clone in a ruff directory):

rm -rf ruff/crates/red_knot/vendor/typeshed
mkdir ruff/crates/red_knot/vendor/typeshed
cp typeshed/README.md ruff/crates/red_knot/vendor/typeshed
cp typeshed/LICENSE ruff/crates/red_knot/vendor/typeshed
cp -r typeshed/stdlib ruff/crates/red_knot/vendor/typeshed/stdlib
git -C typeshed rev-parse HEAD > ruff/crates/red_knot/vendor/typeshed/source_commit.txt