Skip to content

[red-knot] Failed to assign to a callable using Unpack #17596

@dhruvmanila

Description

@dhruvmanila

Summary

from typing import Callable, TypeVarTuple, Unpack


def some_func() -> None: ...


T = TypeVarTuple("T")


def unpack(c: Callable[[Unpack[T]], object]):
    pass


def _():
    # red-knot: Argument to this function is incorrect: Expected `(*args: @Todo(todo signature *args), **kwargs: @Todo(todo signature **kwargs)) -> object`, found `def some_func() -> None` [lint:invalid-argument-type]
    unpack(some_func)

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcometyMulti-file analysis & type inference

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions