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

Keep lambda parameters on one line and parenthesize the body if it expands

#21385Merged
Comparing
brent/indent-lambda-params
(
95301b3
) with
main
(
3ac58b4
)
CodSpeed Performance Gauge
0%
Untouched
30
Skipped
13
Archived
9

Benchmarks

52 total
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
9.7 ms9.6 ms
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
29.6 µs29.5 µs
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
77.2 µs77.2 µs
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
222.6 µs222.5 µs
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
496.7 µs496.7 µs
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
108.8 µs108.8 µs
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
2 ms2 ms
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
2 ms2 ms
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
329.7 µs329.7 µs
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
4.4 ms4.4 ms
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
8.6 ms8.6 ms
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
22.9 ms22.9 ms
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
10.3 ms10.3 ms
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
18.9 ms18.9 ms
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
837.6 µs837.6 µs
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
4.3 ms4.3 ms
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
5.2 ms5.2 ms
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
952.6 µs952.7 µs
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
735.8 µs735.9 µs
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
2.2 ms2.2 ms
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
411.4 µs411.5 µs
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
1 ms1 ms

Commits

Click on a commit to change the comparison range
Base
main
3ac58b4
-0.25%
add a couple more test cases
89dc1ad
3 months ago
by ntBre
+0.22%
add too-eagerly parenthesized case from ecosystem
9785066
3 months ago
by ntBre
-0.19%
fix snapshot changes for cases with comments
6f6c09c
3 months ago
by ntBre
0%
fix another ecosystem call expansion
9ef9d03
3 months ago
by ntBre
-0.05%
add wrapping case from the ecosystem check
258b1fd
3 months ago
by ntBre
+0.07%
remove comment
7dddcc8
3 months ago
by ntBre
+0.07%
Merge branch 'main' into brent/indent-lambda-params
1a3e385
2 months ago
by ntBre
0%
mirror comment handling from `maybe_parenthesize_expression`
08b1da3
2 months ago
by ntBre
0%
add some more tests
dfd3460
2 months ago
by ntBre
+0.01%
improve dangling header comment placement
43b53ed
2 months ago
by ntBre
0%
clippy
dc240a1
2 months ago
by ntBre
-0.02%
fix assignment instability without parameters too
f20f3e0
2 months ago
by ntBre
+0.03%
format new dangling comments
e8540d9
2 months ago
by ntBre
-0.1%
Merge branch 'main' into brent/indent-lambda-params
05ff8f5
2 months ago
by ntBre
+0.07%
move preview comment handling mostly into placement.rs
9f9b76b
2 months ago
by ntBre
+0.08%
factor out FormatBody
9d7d94c
2 months ago
by ntBre
-0.14%
reposition dangling comments
0f1ea90
2 months ago
by ntBre
+0.1%
move all body formatting to FormatBody
b80fdfa
2 months ago
by ntBre
-0.01%
improve after_parameters_end_of_line name and docs
95301b3
2 months ago
by ntBre
© 2026 CodSpeed Technology
Home Terms Privacy Docs