Closed lelit closed 7 years ago
just to make sure... you refer to a fix but there is no problem related to this? -> so I gave the question label. from examples/rawlist.py
{
'type': 'rawlist',
'name': 'theme',
'message': 'What do you want to do?',
'choices': [
'Order a pizza',
'Make a reservation',
Separator(),
'Ask opening hours',
'Talk to the receptionist'
]
},
rawlist uses index numbers to select a choice. Seperators() would make a gap in the numbering so we keep track (with key). key += 1 only for choices (basestrings)
$ python examples/rawlist.py
My bad, you're right, who knows what I was thinking, sorry for the noise 😃
Ah, I found the glitch: the problem is actually in expand.py, not rawlist.py!
now I see, looks like you are right. this is probably a c&p "leftover". Does not look very disturbing but also not very reassuring. Let me take another look with a fresh eye tomorrow. I probably just remove it and see what happens. Thank you for your useful input!
At line 43 of rawlist.py there is a reference to
key
: as there's no examples of passing a plain string as a choice, I could not figure out a reasonable fix, or make sense of the followingkey += 1
instruction.