Skip to content

Commit ca7f859

Browse files
committed
fix: update autocompletion callback signatures for modern Typer
1 parent 268f837 commit ca7f859

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/llmling/cli/constants.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import logging
44

5-
import click
6-
import click.shell_completion # noqa: TC002
75
import typer as t
86

97
from llmling.config.store import config_store
@@ -26,24 +24,14 @@
2624
VERBOSE_CMDS = "-v", "--verbose"
2725

2826

29-
def complete_config_names(
30-
ctx: click.Context,
31-
param: click.Parameter,
32-
incomplete: str,
33-
) -> list[str] | list[click.shell_completion.CompletionItem]:
27+
def complete_config_names() -> list[str]:
3428
"""Complete stored config names."""
35-
names = [name for name, _ in config_store.list_configs()]
36-
return [name for name in names if name.startswith(incomplete)]
29+
return [name for name, _ in config_store.list_configs()]
3730

3831

39-
def complete_output_formats(
40-
ctx: click.Context,
41-
param: click.Parameter,
42-
incomplete: str,
43-
) -> list[str]:
32+
def complete_output_formats() -> list[str]:
4433
"""Complete output format options."""
45-
formats = ["text", "json", "yaml"]
46-
return [f for f in formats if f.startswith(incomplete)]
34+
return ["text", "json", "yaml"]
4735

4836

4937
def verbose_callback(ctx: t.Context, _param: t.CallbackParam, value: bool) -> bool:

0 commit comments

Comments
 (0)