Skip to content

Commit

Permalink
refactor: change deprecated autocompletion to shell_complete
Browse files Browse the repository at this point in the history
Before this fix, we sometimes got this warning running unit tests:
.../envs/ev-py310/lib/python3.10/site-packages/typer/core.py:304: DeprecationWarning: 'autocompletion' is renamed to 'sh>
  _typer_param_setup_autocompletion_compat(self, autocompletion=autocompletion)

Also, the click documentation confirms autocompletion is deprecated:
https://click.palletsprojects.com/en/stable/changes/#version-8-0-0
  • Loading branch information
joanise committed Nov 19, 2024
1 parent 6f6e561 commit 5a8a227
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hfgl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def export(
dir_okay=False,
file_okay=True,
help="The path to a trained EveryVoice spec-to-wav model",
autocompletion=complete_path,
shell_complete=complete_path,
),
output_path: Path = typer.Option(
"exported.ckpt",
Expand All @@ -84,7 +84,7 @@ def export(
dir_okay=False,
file_okay=True,
help="The path to a trained EveryVoice spec-to-wav model",
autocompletion=complete_path,
shell_complete=complete_path,
),
):
import os
Expand Down Expand Up @@ -120,7 +120,7 @@ def synthesize(
dir_okay=False,
file_okay=True,
help="The path to a torch file containing time-oriented spectral features [T (frames), K (Mel bands)]",
autocompletion=complete_path,
shell_complete=complete_path,
),
generator_path: Path = typer.Option(
...,
Expand All @@ -130,7 +130,7 @@ def synthesize(
dir_okay=False,
file_okay=True,
help="The path to a trained EveryVoice spec-to-wav model",
autocompletion=complete_path,
shell_complete=complete_path,
),
):
"""Given some Mel spectrograms and a trained model, generate some audio. i.e. perform *copy synthesis*"""
Expand Down

0 comments on commit 5a8a227

Please sign in to comment.