mirror of https://github.com/astral-sh/ruff
|
|
||
|---|---|---|
| .. | ||
| snapshots | ||
| src/benchmark | ||
| .gitignore | ||
| README.md | ||
| package-lock.json | ||
| package.json | ||
| pyproject.toml | ||
| uv.lock | ||
README.md
Getting started
- Unix:
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- Build ty:
cargo build --bin ty --release cdinto the benchmark directory:cd scripts/ty_benchmark- Install Pyright:
npm install - Run benchmarks:
uv run benchmark
Requires hyperfine 1.20 or newer.
Known limitations
The tested type checkers implement Python's type system to varying degrees and some projects only successfully pass type checking using a specific type checker.
Updating the benchmark
The benchmark script supports snapshoting the results when running with --snapshot and --accept.
The goal of those snapshots is to catch accidental regressions. For example, if a project adds
new dependencies that we fail to install. They are not intended as a testing tool. E.g. the snapshot runner doesn't account for platform differences so that
you might see differences when running the snapshots on your machine.