mirror of https://github.com/astral-sh/ruff
This is a first stab at solving https://github.com/astral-sh/ty/issues/500, at least in part, with the old solver. We add a new `TypeRelation` that lets us opt into using constraint sets to describe when a typevar is assignability to some type, and then use that to calculate a constraint set that describes when two callable types are assignable. If the callable types contain typevars, that constraint set will describe their valid specializations. We can then walk through all of the ways the constraint set can be satisfied, and record a type mapping in the old solver for each one. --------- Co-authored-by: Carl Meyer <carl@astral.sh> Co-authored-by: Alex Waygood <alex.waygood@gmail.com> |
||
|---|---|---|
| .. | ||
| benches | ||
| resources | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
Ruff Benchmarks
The ruff_benchmark crate benchmarks the linter and the formatter on individual files:
# Run once on the "baseline".
cargo bench -p ruff_benchmark -- --save-baseline=main
# Compare against the "baseline".
cargo bench -p ruff_benchmark -- --baseline=main
# Run the lexer benchmarks.
cargo bench -p ruff_benchmark lexer -- --baseline=main
See CONTRIBUTING.md on how to use these benchmarks.