ty
ty copied to clipboard
Keyword-argument completions not shown in a decorator call without a class/function below it
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:
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 😆
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