ruff/crates
Dhruv Manilawala d43a3d34dd
[ty] Avoid unnecessary argument type expansion (#19999)
## Summary

Part of: https://github.com/astral-sh/ty/issues/868

This PR adds a heuristic to avoid argument type expansion if it's going
to eventually lead to no matching overload.

This is done by checking whether the non-expandable argument types are
assignable to the corresponding annotated parameter type. If one of them
is not assignable to all of the remaining overloads, then argument type
expansion isn't going to help.

## Test Plan

Add mdtest that would otherwise take a long time because of the number
of arguments that it would need to expand (30).
2025-08-21 06:13:11 +00:00
..
ruff [pyupgrade] Handle nested Optionals (UP045) (#19770) 2025-08-19 18:12:15 -04:00
ruff_annotate_snippets Move full diagnostic rendering to ruff_db (#19415) 2025-08-08 12:56:23 -04:00
ruff_benchmark Feature/build riscv64 bin (#19819) 2025-08-14 16:11:14 +02:00
ruff_cache
ruff_db [ty] Speedup project file discovery (#19913) 2025-08-14 19:38:39 +01:00
ruff_dev Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_diagnostics [ty] Implement diagnostic caching (#19605) 2025-07-30 11:04:34 +01:00
ruff_formatter Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_graph [ty] Remove KnownModule::is_enum (#19681) 2025-08-01 10:31:12 +02:00
ruff_index Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
ruff_linter [pyupgrade] Avoid reporting __future__ features as unnecessary when they are used (UP010) (#19769) 2025-08-20 15:22:03 -04:00
ruff_macros Don't cache files with diagnostics (#19869) 2025-08-12 15:28:44 -04:00
ruff_memory_usage [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
ruff_notebook
ruff_options_metadata Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_ast Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_ast_integration_tests Disallow implicit concatenation of t-strings and other string types (#19485) 2025-07-27 12:41:03 +00:00
ruff_python_codegen Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_formatter Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_index
ruff_python_literal
ruff_python_parser Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_semantic Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_python_stdlib
ruff_python_trivia
ruff_python_trivia_integration_tests
ruff_server Update Rust toolchain to 1.89 (#19807) 2025-08-07 18:21:50 +02:00
ruff_source_file Option::unwrap is now const (#20007) 2025-08-20 13:40:49 -04:00
ruff_text_size [ty] Fix a few more diagnostic differences from Ruff (#19806) 2025-08-08 11:31:19 -04:00
ruff_wasm Bump 0.12.9 (#19917) 2025-08-14 11:54:44 -04:00
ruff_workspace [flake8_import_conventions] Avoid false positives for NFKC-normalized __debug__ import aliases in ICN001 (#19411) 2025-08-06 06:42:51 +00:00
ty [ty] distinguish base conda from child conda (#19990) 2025-08-20 09:07:42 -04:00
ty_combine [ty] Support LSP client settings (#19614) 2025-08-06 18:37:21 +05:30
ty_ide [ty] add docstrings to completions based on type (#20008) 2025-08-20 17:00:09 -04:00
ty_project [ty] Fix example in environment docs (#19937) 2025-08-16 14:37:28 +00:00
ty_python_semantic [ty] Avoid unnecessary argument type expansion (#19999) 2025-08-21 06:13:11 +00:00
ty_server [ty] add docstrings to completions based on type (#20008) 2025-08-20 17:00:09 -04:00
ty_static [ty] distinguish base conda from child conda (#19990) 2025-08-20 09:07:42 -04:00
ty_test [ty] Re-arrange "list modules" implementation for Salsa caching 2025-08-20 10:41:47 -04:00
ty_vendored [ty] Represent NamedTuple as an opaque special form, not a class (#19915) 2025-08-15 18:20:14 +01:00
ty_wasm [ty] add docstrings to completions based on type (#20008) 2025-08-20 17:00:09 -04:00