From f335d8ffd268a6a10b2b348b0549be1a673050f3 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 29 Jul 2025 08:48:30 +0100 Subject: [PATCH] move the version flag --- obsws_cli/app.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/obsws_cli/app.py b/obsws_cli/app.py index 0e68533..e83c010 100644 --- a/obsws_cli/app.py +++ b/obsws_cli/app.py @@ -103,17 +103,6 @@ def main( show_default=5, ), ] = settings.get('timeout'), - version: Annotated[ - bool, - typer.Option( - '--version', - '-v', - is_eager=True, - help='Show the CLI version and exit', - show_default=False, - callback=version_callback, - ), - ] = False, style: Annotated[ str, typer.Option( @@ -135,6 +124,17 @@ def main( show_default=False, ), ] = settings.get('style_no_border'), + version: Annotated[ + bool, + typer.Option( + '--version', + '-v', + is_eager=True, + help='Show the CLI version and exit', + show_default=False, + callback=version_callback, + ), + ] = False, debug: Annotated[ bool, typer.Option( @@ -151,7 +151,9 @@ def main( ): """obsws_cli is a command line interface for the OBS WebSocket API.""" ctx.ensure_object(dict) - ctx.obj['obsws'] = ctx.with_resource(obsws.ReqClient(**ctx.params)) + ctx.obj['obsws'] = ctx.with_resource( + obsws.ReqClient(host=host, port=port, password=password, timeout=timeout) + ) ctx.obj['style'] = styles.request_style_obj(style, no_border)