-
Notifications
You must be signed in to change notification settings - Fork 216
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:
Details
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]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.
Reactions are currently unavailable
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