You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to use click.Tuple with 2 different data types i.e. type=click.Tuple([float, str]), default=(0.0, 'test') The TUI breaks with this error: TypeError: '<' not supported between instances of 'float' and 'str'
It works fine if no default is provided or the default is set to None. It also works if both tuple values are str.
Not sure if that is a known issue or if it is on my side.
The text was updated successfully, but these errors were encountered:
importclickfromtrogonimporttui@tui()@click.command()@click.option('--tuple', 'test_tuple', type=click.Tuple([float, str]), default=(0.0, 'test'), help="Just a test for failure")deftest(test_tuple):
click.echo(f"Hello tuple: {test_tuple}!")
if__name__=="__main__":
test()
If I run it not with tui it works but the tui command end in TypeError: '<' not supported between instances of 'str' and 'float'
I also should note that chnages the tuple to hold the same data type it is working as well. Even though only the first default value is shown in the TUI. Setting no default value works.
Also I am using
python=3.11.3
click=8.1.3
trogon=0.4.0
If I try to use click.Tuple with 2 different data types i.e. type=click.Tuple([float, str]), default=(0.0, 'test') The TUI breaks with this error: TypeError: '<' not supported between instances of 'float' and 'str'
It works fine if no default is provided or the default is set to None. It also works if both tuple values are str.
Not sure if that is a known issue or if it is on my side.
The text was updated successfully, but these errors were encountered: