Skip to content

no-matching-overload reported for decorated function with correct typing #2027

@egorbn

Description

@egorbn

Summary

Issue

no-matching-overload is reported even though the function being called is typed and the argument has the correct type.

Minimum reproducible example

Tested only in this one minimum reproducible case with prefect:

# hello.py
from prefect import flow, task


@task
def echo_message(message: str) -> None:
    """Print the provided message."""
    print(message)


@flow
def run_flow() -> None:
    constant_message = "Hello from Prefect!"
    echo_message(constant_message)


if __name__ == "__main__":
    run_flow()

And here's the result:
Image

Additional info

Using in neovim through mason and nvim-lspconfig

NVIM v0.11.5
Build type: Release
LuaJIT 2.1.1765228720

Version

ty 0.0.2 (4283557 2025-12-16)

Sub-issues

Metadata

Metadata

Assignees

Labels

genericsBugs or features relating to ty's generics implementationoverloads

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions