astral-sh
ruff
BlogDocsChangelog

[red-knot] Fix MRO inference for protocol classes; allow inheritance from subscripted `Generic[]`; forbid subclassing unsubscripted `Generic`

#17452Merged
Comparing
alex/protocol-mros
(
fe9f655
) with
main
(
fd3fc34
)
CodSpeed Performance Gauge
+12%
Improvements
1
Untouched
32

Benchmarks

Improved

red_knot_check_file[incremental]
crates/ruff_benchmark/benches/red_knot.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
+12%
5.5 ms4.9 ms

Passed

red_knot_micro[many_string_assignments]
crates/ruff_benchmark/benches/red_knot.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
56.6 ms56.6 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.6 ms2.6 ms
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
4 ms4 ms
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
2 ms2 ms
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
918.3 µs918.3 µs
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
2 ms2 ms
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
17.6 ms17.6 ms
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
974.1 µs974.1 µs
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
241.3 µs241.3 µs
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
2.3 ms2.3 ms
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
21.6 ms21.6 ms
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
862.7 µs862.7 µs
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
10.7 ms10.7 ms
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
75.1 µs75.1 µs
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
218.3 µs218.3 µs
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
486.9 µs486.9 µs
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
29.2 µs29.2 µs
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
308.2 µs308.2 µs
formatter[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
1.9 ms1.9 ms
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
103.8 µs103.8 µs
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
3.5 ms3.5 ms
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
9.5 ms9.5 ms
formatter[unicode/pypinyin.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
664.5 µs664.5 µs
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
4.3 ms4.3 ms
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
744.9 µs744.9 µs
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
376.4 µs376.4 µs
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
8.9 ms8.9 ms
linter/default-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
202.9 µs202.9 µs
red_knot_check_file[cold]
crates/ruff_benchmark/benches/red_knot.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
97.8 ms97.9 ms

Commits

Click on a commit to change the comparison range
Base
main
fd3fc34
+0.03%
fix pre-commit & docs
022306a
8 months ago
by AlexWaygood
+0.01%
add diagnostic for inheritance from plain `Generic`
bd53d78
8 months ago
by AlexWaygood
+11.6%
add a hack to handle old-style generics
cd4afac
8 months ago
by AlexWaygood
+1.13%
Merge branch 'main' into alex/protocol-mros
0dc04bf
8 months ago
by AlexWaygood
-0.31%
add temporary hack for `ABCMeta`
f322d05
8 months ago
by AlexWaygood
0%
rename some things
fe9f655
8 months ago
by AlexWaygood
© 2025 CodSpeed Technology
Home Terms Privacy Docs