astral-sh
ruff
BlogDocsChangelog

[ty] Infer typevar specializations for `Callable` types

#21551
Comparing
dcreager/callable-return
(
f29200c
) with
main
(
857fd4f
)
CodSpeed Performance Gauge
-16%
Regressions
2
Untouched
16
Skipped
34

Benchmarks

Skipped (34)

Failed

large[pydantic]
crates/ruff_benchmark/benches/ty_walltime.rs
Regression
CodSpeed Performance Gauge
-6%
201 s214.6 s
small[altair]
crates/ruff_benchmark/benches/ty_walltime.rs
Regression
CodSpeed Performance Gauge
-16%
5.5 s6.6 s

Passed

ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
0%
126.5 ms125.9 ms
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
0%
6.9 ms6.9 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
85.8 ms85.6 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
0%
68.2 ms68.1 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
0%
68 ms67.9 ms
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
138.2 ms138.1 ms
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
0%
254.5 ms254.7 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
0%
66.6 ms66.7 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
0%
71.7 ms71.8 ms
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
0%
67.8 ms67.9 ms
attrs
crates/ruff_benchmark/benches/ty.rs::project::attrs::project
CodSpeed Performance Gauge
0%
454.3 ms455.3 ms
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
-1%
1.4 s1.5 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
-2%
1.2 s1.2 s
small[freqtrade]
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
8.3 s8.5 s
large[sympy]
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
56 s57.1 s
small[tanjun]
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
2.8 s2.9 s

Commits

Click on a commit to change the comparison range
Base
main
857fd4f
-0.24%
clean up the diff
2c62674
11 days ago
by dcreager
+0.75%
mark these as TODO
d88120b
6 days ago
by dcreager
-0.56%
mdlint
957304e
6 days ago
by dcreager
+0.07%
clippity bippity
3045258
5 days ago
by dcreager
+0.09%
don't create T ≤ T constraints
58c67fd
13 days ago
by dcreager
-6.14%
fix tests
d3fd988
5 days ago
by dcreager
+5.87%
doc
3bcca62
5 days ago
by dcreager
+0.51%
self
75e9d66
5 days ago
by dcreager
-1.62%
fix test
1e33d25
4 days ago
by dcreager
-0.06%
catch self-referential typevars
b314119
4 days ago
by dcreager
-4.25%
format, really?!?!
8c7e20a
4 days ago
by dcreager
-0.36%
Merge remote-tracking branch 'origin/main' into dcreager/callable-return * origin/main: (41 commits) [ty] Carry generic context through when converting class into `Callable` (#21798) [ty] Add more tests for renamings (#21810) [ty] Minor improvements to `assert_type` diagnostics (#21811) [ty] Add some attribute/method renaming test cases (#21809) Update mkdocs-material to 9.7.0 (Insiders now free) (#21797) Remove unused whitespaces in test cases (#21806) [ty] fix panic when instantiating a type variable with invalid constraints (#21663) [ty] fix build failure caused by conflicts between #21683 and #21800 (#21802) [ty] do nothing with `store_expression_type` if `inner_expression_inference_state` is `Get` (#21718) [ty] increase the limit on the number of elements in a non-recursively defined literal union (#21683) [ty] normalize typevar bounds/constraints in cycles (#21800) [ty] Update completion eval to include modules [ty] Add modules to auto-import [ty] Add support for module-only import requests [ty] Refactor auto-import symbol info [ty] Clarify the use of `SymbolKind` in auto-import [ty] Redact ranking of completions from e2e LSP tests [ty] Tweaks tests to use clearer language [ty] Update evaluation results [ty] Make auto-import ignore symbols in modules starting with a `_` ...
c0dc6cf
3 days ago
by dcreager
+1.45%
pull this out into a helper method
c74eb12
3 days ago
by dcreager
-11.11%
callable invariance rears its head again
d47e9a6
2 days ago
by dcreager
-0.49%
Merge remote-tracking branch 'origin/main' into dcreager/callable-return * origin/main: [ty] Add test case for fixed panic (#21832) [ty] Avoid double-analyzing tuple in `Final` subscript (#21828) [flake8-bandit] Fix false positive when using non-standard `CSafeLoader` path (S506). (#21830) Add minimal-size build profile (#21826)
f29200c
13 hours ago
by dcreager
© 2025 CodSpeed Technology
Home Terms Privacy Docs