ruff/crates
Dhruv Manilawala c7e020df6b
[ty] Filter overloads based on Any / Unknown (#18607)
## Summary

Closes: astral-sh/ty#552

This PR adds support for step 5 of the overload call evaluation
algorithm which specifies:

> For all arguments, determine whether all possible materializations of
the argument’s type are
> assignable to the corresponding parameter type for each of the
remaining overloads. If so,
> eliminate all of the subsequent remaining overloads.

The algorithm works in two parts:

1. Find out the participating parameter indexes. These are the
parameters that aren't gradual equivalent to one or more parameter types
at the same index in other overloads.
2. Loop over each overload and check whether that would be the _final_
overload for the argument types i.e., the remaining overloads will never
be matched against these argument types

For step 1, the participating parameter indexes are computed by just
comparing whether all the parameter types at the corresponding index for
all the overloads are **gradual equivalent**.

The step 2 of the algorithm used is described in [this
comment](https://github.com/astral-sh/ty/issues/552#issuecomment-2969165421).

## Test Plan

Update the overload call tests.
2025-06-17 15:35:09 +05:30
..
ruff Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
ruff_annotate_snippets Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_benchmark [ty] Add --config-file CLI arg (#18083) 2025-05-27 08:00:38 +02:00
ruff_cache Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_db [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ruff_dev Remove Message::to_rule (#18447) 2025-06-05 12:48:29 -04:00
ruff_diagnostics Add a ViolationMetadata::rule method (#18234) 2025-05-28 09:27:09 -04:00
ruff_formatter Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_graph [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ruff_index Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_linter [pyupgrade] Suppress UP008 diagnostic if super symbol is not builtin (#18688) 2025-06-16 15:09:31 -04:00
ruff_macros [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ruff_notebook Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_options_metadata [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_python_ast [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_ast_integration_tests [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_codegen [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_formatter Hug closing } when f-string expression has a format specifier (#18704) 2025-06-17 07:39:42 +02:00
ruff_python_index Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_literal Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_parser Add syntax error when conversion flag does not immediately follow exclamation mark (#18706) 2025-06-16 11:44:42 -05:00
ruff_python_resolver Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_semantic [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_stdlib Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_trivia Treat ty: comments as pragma comments (#18532) 2025-06-07 16:02:43 +02:00
ruff_python_trivia_integration_tests Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_server Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
ruff_source_file Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_text_size Add rustfmt.toml file (#18197) 2025-05-19 11:40:58 -04:00
ruff_wasm Bump 0.11.13 (#18484) 2025-06-05 15:18:38 -05:00
ruff_workspace Drop confusing second * from glob pattern example (#18709) 2025-06-16 10:41:43 -04:00
ty [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ty_ide [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
ty_project [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ty_python_semantic [ty] Filter overloads based on Any / Unknown (#18607) 2025-06-17 15:35:09 +05:30
ty_server [ty] Add python.ty.disableLanguageServices config (#18230) 2025-06-17 13:50:45 +05:30
ty_test [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
ty_vendored Sync vendored typeshed stubs (#18679) 2025-06-15 10:20:33 +01:00
ty_wasm [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00