Skip to content

Commit

Permalink
fix if conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Sep 5, 2024
1 parent 749cade commit 286b94e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _typer_param_setup_autocompletion_compat(
Callable[[click.Context, List[str], str], List[Union[Tuple[str, str], str]]]
] = None,
) -> None:
if autocompletion is None and self._custom_shell_complete is not None:
if self._custom_shell_complete is not None:
import warnings

warnings.warn(
Expand All @@ -72,6 +72,8 @@ def _typer_param_setup_autocompletion_compat(
stacklevel=2,
)

if autocompletion is not None:

def compat_autocompletion(
ctx: click.Context, param: click.core.Parameter, incomplete: str
) -> List["click.shell_completion.CompletionItem"]:
Expand Down

0 comments on commit 286b94e

Please sign in to comment.