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

[ty] Reachability analysis for `isinstance(…)` branches

#19503Merged
Comparing
david/isinstance-inference
(
653ec2a
) with
main
(
b605c3e
)
CodSpeed Performance Gauge
0%
Untouched
41

Benchmarks

41 total
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
+1%
60.8 ms60.5 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
0%
61.4 ms61.1 ms
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
116.2 ms115.9 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
71.7 ms71.6 ms
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
694.9 µs694.9 µs
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
790.6 µs790.6 µs
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
322.4 µs322.4 µs
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
8.5 ms8.5 ms
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
5 ms5 ms
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
106.7 µs106.7 µs
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
965.7 µs965.6 µs
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
929.2 µs929.2 µs
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
75.8 µs75.8 µs
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
219.8 µs219.8 µs
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
29.3 µs29.3 µs
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
492.2 µs492.2 µs
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
2 ms2 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.1 ms10.1 ms
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
9.5 ms9.5 ms
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
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
4.1 ms4.1 ms
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
377.7 µs377.7 µs
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
2 ms2 ms
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
3.5 ms3.5 ms

Commits

Click on a commit to change the comparison range
Base
main
b605c3e
-0.4%
[ty] Type inference for isinstance(…) calls
746382f
7 months ago
by sharkdp
-0.62%
Handle intersections recursively
5615b10
7 months ago
by sharkdp
+0.35%
Add inference for isinstance(SomeClass, type)
653ec2a
7 months ago
by sharkdp
© 2026 CodSpeed Technology
Home Terms Privacy Docs