Skip to content

Commit

Permalink
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 5, 2024
1 parent cfbeb3d commit 749cade
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorial/options-autocompletion.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ It doesn't matter how you name them, in which order, or which ones of the 3 opti

## Comparison to Click functionality

Note that Click 7 had a similar [`autocompletion` function](https://click.palletsprojects.com/en/7.x/bashcomplete/), but it worked slightly differently.
Note that Click 7 had a similar [`autocompletion` function](https://click.palletsprojects.com/en/7.x/bashcomplete/), but it worked slightly differently.

It required the callback function to take exactly the 3 keyword arguments `ctx`, `args` and `incomplete` in that exact order, instead of matching them dynamically based on types, as Typer does.

Expand Down
1 change: 1 addition & 0 deletions typer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def _typer_param_setup_autocompletion_compat(
) -> None:
if autocompletion is None and self._custom_shell_complete is not None:
import warnings

warnings.warn(
"In Typer, only the parameter 'autocompletion' is supported. "
"The usage of 'shell_complete' will be deprecated in upcoming versions. ",
Expand Down

0 comments on commit 749cade

Please sign in to comment.