From 2d351e00b54d48463d6dfe618732a199285f2d3a Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 4 Jun 2025 15:49:44 +0100 Subject: [PATCH] wrap annotations with Annotated --- obsws_cli/input.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/obsws_cli/input.py b/obsws_cli/input.py index a5670ee..4c8da8f 100644 --- a/obsws_cli/input.py +++ b/obsws_cli/input.py @@ -67,7 +67,10 @@ def list( @app.command('mute | m') -def mute(ctx: typer.Context, input_name: str): +def mute( + ctx: typer.Context, + input_name: Annotated[str, typer.Argument(..., help='Name of the input to mute.')], +): """Mute an input.""" if not validate.input_in_inputs(ctx, input_name): err_console.print(f"Input '{input_name}' not found.") @@ -82,7 +85,12 @@ def mute(ctx: typer.Context, input_name: str): @app.command('unmute | um') -def unmute(ctx: typer.Context, input_name: str): +def unmute( + ctx: typer.Context, + input_name: Annotated[ + str, typer.Argument(..., help='Name of the input to unmute.') + ], +): """Unmute an input.""" if not validate.input_in_inputs(ctx, input_name): err_console.print(f"Input '{input_name}' not found.") @@ -97,7 +105,12 @@ def unmute(ctx: typer.Context, input_name: str): @app.command('toggle | tg') -def toggle(ctx: typer.Context, input_name: str): +def toggle( + ctx: typer.Context, + input_name: Annotated[ + str, typer.Argument(..., help='Name of the input to toggle.') + ], +): """Toggle an input.""" if not validate.input_in_inputs(ctx, input_name): err_console.print(f"Input '{input_name}' not found.")