ruff
efbb7325 - [ty] Suggest keyword-only arguments between variadic parameters (#26134)

Commit
39 days ago
[ty] Suggest keyword-only arguments between variadic parameters (#26134) ## Summary Functions with unannotated `*args` and `**kwargs` use a gradual parameter list. Prior to this change, we omitted all structured parameters for gradual signatures when building signature help, including explicit keyword-only parameters retained between the variadics: ```python def func(*args, special, **kwargs): ... func(sp<CURSOR>) ``` This extracts displayed parameters from gradual signatures the same way we do for standard and `Concatenate` signatures. Pure `(*args, **kwargs)` signatures still render their parameters as `...` and expose no concrete parameters, while retained parameters such as `special` are now available to keyword-argument completion. The regression test covers both reported shapes, with and without a positional parameter before `*args`. Closes https://github.com/astral-sh/ty/issues/3803.
Author
Parents
Loading