Avatar for the astral-sh user
astral-sh
ruff
BlogDocsChangelog

Add `--range` option to `ruff format`

#9733Merged
Comparing
range-formatting-cli
(
ccc71db
) with
main
(
4f7fb56
)
CodSpeed Performance Gauge
+44%
Improvement
10
Untouched
20

Benchmarks

30 total
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
+44%
7 ms4.8 ms
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
+23%
12.3 ms10 ms
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
+14%
22.9 ms20.1 ms
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+14%
20.5 ms18 ms
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+13%
2.7 ms2.4 ms
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+13%
4.9 ms4.3 ms
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+11%
9.6 ms8.6 ms
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
+10%
2.8 ms2.6 ms
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
+6%
831.6 µs784 µs
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+5%
760.5 µs722.1 µs
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
47 µs47 µs
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
4.1 ms4.1 ms
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
267.7 µs267.7 µs
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
849.1 µs848.9 µs
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
2.2 ms2.2 ms
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
4.9 ms4.9 ms
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
258.8 µs258.7 µs
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
325.8 µs325.7 µs
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
665.9 µs665.9 µs
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
104.6 µs104.6 µs
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
12.5 ms12.5 ms
formatter[unicode/pypinyin.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
689.4 µs690.4 µs
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
9.7 ms9.7 ms

Commits

Click on a commit to change the comparison range
Base
main
4f7fb56
-0.02%
Some code review feedback
0cd0449
2 years ago
by MichaReiser
+39.09%
Improve CLI documentation, add non-ascii test case
c216895
2 years ago
by MichaReiser
+0.01%
Discard changes to crates/ruff/Cargo.toml
3ccb5b9
2 years ago
by MichaReiser
0%
Update crates/ruff/src/args.rs
8dfbdb0
2 years ago
by MichaReiser
+5.33%
Update configuration.md
ccc71db
2 years ago
by MichaReiser
© 2026 CodSpeed Technology
Home Terms Privacy Docs