Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗑️ Deprecate shell_complete and continue to use autocompletion for CLI parameters #974

Merged
merged 12 commits into from
Dec 4, 2024
Prev Previous commit
Next Next commit
add notes in the source code that shell_complete is not supported and…
… will be removed
  • Loading branch information
svlandeg committed Sep 5, 2024
commit 1975fce8268b18f550aa4bc5a722cd9e7910d1e2
2 changes: 2 additions & 0 deletions typer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def __init__(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -397,6 +398,7 @@ def __init__(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down
3 changes: 3 additions & 0 deletions typer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def __init__(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -281,6 +282,7 @@ def __init__(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -400,6 +402,7 @@ def __init__(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down
6 changes: 6 additions & 0 deletions typer/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def Option(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -82,6 +83,7 @@ def Option(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -143,6 +145,7 @@ def Option(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -262,6 +265,7 @@ def Argument(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -317,6 +321,7 @@ def Argument(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down Expand Up @@ -370,6 +375,7 @@ def Argument(
expose_value: bool = True,
is_eager: bool = False,
envvar: Optional[Union[str, List[str]]] = None,
# Note that shell_complete is not fully supported and will be removed in future versions
shell_complete: Optional[
Callable[
[click.Context, click.Parameter, str],
Expand Down