mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-27 00:56:23 +00:00
Fix type hinting issue with call to click.Choice (#387)
* Fix type hinting issue with call to click.Choice which takes a Sequence not dictionary. Convert TYPE_TO_CLASS keys to a list to pass in. * Update kasa/cli.py Co-authored-by: Teemu R. <tpr@iki.fi> Co-authored-by: Jules Davis <jules@focalpointvr.com> Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
parent
f32f7f3925
commit
1ac6c66277
@ -57,7 +57,7 @@ pass_dev = click.make_pass_decorator(SmartDevice)
|
||||
"--type",
|
||||
envvar="KASA_TYPE",
|
||||
default=None,
|
||||
type=click.Choice(TYPE_TO_CLASS, case_sensitive=False),
|
||||
type=click.Choice(list(TYPE_TO_CLASS), case_sensitive=False),
|
||||
)
|
||||
@click.version_option(package_name="python-kasa")
|
||||
@click.pass_context
|
||||
|
Loading…
x
Reference in New Issue
Block a user