From 8cdd4f59f87e9fafd4ef05731fc42fe13679b581 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Tue, 5 Dec 2023 23:20:29 +0100 Subject: [PATCH] Use consistent naming for cli envvars (#570) * Use consistent naming for cli envvars * Fix linting --- kasa/cli.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kasa/cli.py b/kasa/cli.py index c0a380dc..3557bf4e 100755 --- a/kasa/cli.py +++ b/kasa/cli.py @@ -129,7 +129,11 @@ def json_formatter_cb(result, **kwargs): type=click.Choice(DEVICE_TYPES, case_sensitive=False), ) @click.option( - "--json", default=False, is_flag=True, help="Output raw device response as JSON." + "--json/--no-json", + envvar="KASA_JSON", + default=False, + is_flag=True, + help="Output raw device response as JSON.", ) @click.option( "--timeout", @@ -149,14 +153,14 @@ def json_formatter_cb(result, **kwargs): "--username", default=None, required=False, - envvar="TPLINK_CLOUD_USERNAME", + envvar="KASA_USERNAME", help="Username/email address to authenticate to device.", ) @click.option( "--password", default=None, required=False, - envvar="TPLINK_CLOUD_PASSWORD", + envvar="KASA_PASSWORD", help="Password to use to authenticate to device.", ) @click.version_option(package_name="python-kasa")