From 9adccf96d9c379c2b941ec34354af8c89232b2ea Mon Sep 17 00:00:00 2001 From: up-n-atom Date: Sat, 16 Dec 2023 23:57:43 -0500 Subject: [PATCH] Add version option --- xmo/xmo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmo/xmo.py b/xmo/xmo.py index e86bd83..6f57282 100644 --- a/xmo/xmo.py +++ b/xmo/xmo.py @@ -6,6 +6,7 @@ from enum import Enum from ipaddress import IPv4Address from sagemcom_api.client import SagemcomClient from sagemcom_api.enums import EncryptionMethod +from . import __version__ class EnumChoice(click.Choice): @@ -27,6 +28,7 @@ class EnumChoice(click.Choice): @click.option('-a', '--auth-method', default=EncryptionMethod.SHA512, type=EnumChoice(EncryptionMethod), help='Authentication method') +@click.version_option(__version__) @click.pass_context async def cli(ctx: click.Context, host: IPv4Address, username: str, password: str, auth_method: EncryptionMethod) -> None: ctx.obj = client = await ctx.with_async_resource(