ty icon indicating copy to clipboard operation
ty copied to clipboard

Keyword-argument completions not shown in a decorator call without a class/function below it

Open AlexWaygood opened this issue 4 days ago • 1 comments

Summary

Consider this situation:

from dataclasses import dataclass

@dataclass(fro<CURSOR>)

I would expect one of the completions offered here to be frozen=, since that's a valid keyword argument to the dataclasses.dataclass decorator. But this is not one of the completions offered currently:

Image

We do include that completion if there's already a class or function definition below the decorator -- but I hadn't got to that bit yet 😆

Image

As an aside -- these screenshots are from the ty playground. It looks like https://github.com/astral-sh/ruff/pull/21988 didn't work for the playground. I now see the = rendered as part of the completion suggestion locally in VSCode for keyword arguments, but in the playground it's still rendered as frozen rather than frozen=.

Version

No response

AlexWaygood avatar Dec 24 '25 12:12 AlexWaygood