-
Couldn't load subscription status.
- Fork 131
Closed
astral-sh/ruff
#20223Labels
bugSomething isn't workingSomething isn't workingcallsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnostics
Milestone
Description
Status:
- support single-starred arguments ([ty] Splat variadic arguments into parameter list ruff#18996)
- support single-starred arguments in calls to overloaded functions ([ty] Support single-starred argument for overload call ruff#20223)
- support double-starred arguments ([ty] Add support for
**kwargsruff#20430)
Original description:
Summary
Minimal reproducer:
def foo(initial_arg: str, *args: str) -> None:
...
foo(*["a", "b", "c"]) # No argument provided for required parameter `initial_arg` of function `foo` (lint:missing-argument) [Ln 4, Col 1]
foo(*[1, "a", "b"]) # No argument provided for required parameter `initial_arg` of function `foo` (lint:missing-argument) [Ln 4, Col 1]https://play.ty.dev/4b8dc795-03b5-4fbf-a5c3-639f9518e093
I'd expect first the invocation to type check because the splatted args have compatible types to cover both the first argument and the var args.
corrylc, rosborn, j178, toppk, SoftwareApe and 31 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcallsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnostics