From 5a8a22706c20aeb55264b7bfe606fd037b7ac07f Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Tue, 19 Nov 2024 14:40:26 -0500 Subject: [PATCH] refactor: change deprecated autocompletion to shell_complete 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 --- hfgl/cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hfgl/cli.py b/hfgl/cli.py index 9b2ca86..1e3a917 100644 --- a/hfgl/cli.py +++ b/hfgl/cli.py @@ -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", @@ -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 @@ -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( ..., @@ -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*"""