mirror of https://github.com/astral-sh/ruff
## Summary closes: https://github.com/astral-sh/ty/issues/247 This PR adds support for variadic arguments to overload call evaluation. This basically boils down to making sure that the overloads are not filtered out incorrectly during the step 5 in the overload call evaluation algorithm. For context, the step 5 tries to filter out the remaining overloads after finding an overload where the materialization of argument types are assignable to the parameter types. The issue with the previous implementation was that it wouldn't unpack the variadic argument and wouldn't consider the many-to-one (multiple arguments mapping to a single variadic parameter) correctly. This PR fixes that. ## Test Plan Update existing test cases and resolve the TODOs. |
||
|---|---|---|
| .. | ||
| annotation.md | ||
| builtins.md | ||
| callable_instance.md | ||
| constructor.md | ||
| dunder.md | ||
| dunder_import.md | ||
| function.md | ||
| getattr_static.md | ||
| invalid_syntax.md | ||
| methods.md | ||
| never.md | ||
| open.md | ||
| overloads.md | ||
| replace.md | ||
| str_startswith.md | ||
| subclass_of.md | ||
| union.md | ||