From 4a8e0f1155c7d9cacc932db068c7e7e90a4af12d Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Tue, 27 Feb 2024 16:25:27 -0500 Subject: [PATCH] fix: patch autocompletion of file args and opts --- aligner/cli.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/aligner/cli.py b/aligner/cli.py index 2996c82..4da0ec7 100644 --- a/aligner/cli.py +++ b/aligner/cli.py @@ -17,10 +17,18 @@ ) +def complete_path(): + return [] + + @app.command() def align_single( - text_path: Path = typer.Argument(..., exists=True, file_okay=True, dir_okay=False), - audio_path: Path = typer.Argument(..., exists=True, file_okay=True, dir_okay=False), + text_path: Path = typer.Argument( + ..., exists=True, file_okay=True, dir_okay=False, autocompletion=complete_path + ), + audio_path: Path = typer.Argument( + ..., exists=True, file_okay=True, dir_okay=False, autocompletion=complete_path + ), sample_rate: int = typer.Option( 16000, help="The target sample rate for the model." ),