magmax/python-inquirer

Tuples as list choices no longer print as expected

dns13 opened this issue · 3 comments

The following example prints the integer part of the selected entry with v3.2.1 but the string entry in v3.2.2. I think this is a regression and not working as expected.

import inquirer

entries = [
	("one", 1),
	("two", 2),
	("three", 3)
]

questions = [
	inquirer.List('device', message="test", choices=entries),
]

answers = inquirer.prompt(questions)

print(answers['device'])

With v3.2.1: 2
With v3.2.2: two

Moin!,

the str and repr have always been different for TaggedValue pairs, one is the value and one the tag. But this shouldn't have chnanged. I will investigate.

yes it seems to be regression and will be fixed

Thank you!