ruff/crates/ty_python_semantic/resources/mdtest/call
Dhruv Manilawala e1bb74b25a
[ty] Match variadic argument to variadic parameter (#20511)
## Summary

Closes: https://github.com/astral-sh/ty/issues/1236

This PR fixes a bug where the variadic argument wouldn't match against
the variadic parameter in certain scenarios.

This was happening because I didn't realize that the `all_elements`
iterator wouldn't keep on returning the variable element (which is
correct, I just didn't realize it back then).

I don't think we can use the `resize` method here because we don't know
how many parameters this variadic argument is matching against as this
is where the actual parameter matching occurs.

## Test Plan

Expand test cases to consider a few more combinations of arguments and
parameters which are variadic.
2025-09-25 07:51:56 +00:00
..
annotation.md ty_python_semantic: add union type context to function call type errors 2025-05-09 13:40:51 -04:00
builtins.md [ty] More precise type inference for dictionary literals (#20523) 2025-09-24 18:12:00 -04:00
callable_instance.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
constructor.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
dunder.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
dunder_import.md [ty] Add special-cased inference for __import__(name) and importlib.import_module(name) (#19008) 2025-06-29 11:49:23 +01:00
function.md [ty] Match variadic argument to variadic parameter (#20511) 2025-09-25 07:51:56 +00:00
getattr_static.md [ty] eliminate is_fully_static (#18799) 2025-06-24 18:02:05 -07:00
invalid_syntax.md ty_python_semantic: add union type context to function call type errors 2025-05-09 13:40:51 -04:00
methods.md [ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492) 2025-09-23 14:26:55 +00:00
never.md
open.md [ty] Todo-types for os.fdopen, NamedTemporaryFile, and Path.open (#20549) 2025-09-24 15:43:58 +02:00
overloads.md [ty] Retry parameter matching for argument type expansion (#20153) 2025-09-12 08:40:07 +00:00
replace.md [ty] synthesize __replace__ for dataclasses (>=3.13) (#19545) 2025-07-29 17:32:01 +02:00
str_startswith.md [ty] "foo".startswith is not an instance of types.MethodWrapperType (#20317) 2025-09-10 11:14:26 +00:00
subclass_of.md [ty] Include synthesized arguments in displayed counts for too-many-positional-arguments (#18098) 2025-05-14 22:51:23 -04:00
union.md [ty] eliminate is_fully_static (#18799) 2025-06-24 18:02:05 -07:00