![]() ## Summary Follow-up release for Ruff v0.10 that now includes the following two changes that we intended to ship but slipped: * Changes to how the Python version is inferred when a `target-version` is not specified (#16319) * `blanket-noqa` (`PGH004`): Also detect blanked file-level noqa comments (and not just line level comments). ## Test plan I verified that the binary built on this branch respects the `requires-python` setting ([logs](https://www.diffchecker.com/qyJWYi6W/), left: v0.10, right: v0.11) |
||
---|---|---|
.. | ||
dark.svg | ||
graph-spec.json | ||
light.svg | ||
pyproject.toml | ||
README.md | ||
run.sh | ||
run_all.sh | ||
run_comparisons.sh | ||
run_formatter.sh | ||
run_plugins.sh | ||
run_silent.sh | ||
setup.sh | ||
uv.lock |
benchmarks
Utilities for benchmarking Ruff.
Getting Started
Run ./scripts/benchmarks/setup.sh
to clone the benchmarking target (CPython).
If you're looking to benchmark Ruff against other tools, you'll also need to run uv venv --project ./scripts/benchmarks
,
activate the venv and finally uv sync --project ./scripts/benchmarks
to create a virtual environment with the required dependencies.
Running Benchmarks
Run ./scripts/benchmarks/run.sh
to run Ruff over the target repo (CPython). The
./scripts/benchmarks
folder contains a few other benchmarks (e.g., scripts/benchmarks/run_comparisons.sh
compares Ruff to a variety of other tools).
Generating Plots
The Vega specification for the benchmark plot depicted in the root README can be found at
scripts/benchmarks/graph-spec.json
. You can render this JSON spec in the Vega Editor.
The images seen in the README are generated by exporting the rendered Vega spec as SVG (at around
688px wide) and manually bolding the Ruff title and benchmark time. The dark mode variant is
generated by changing the fill from fill="#333333"
to fill="#C9D1D9"
.