Comments (6)
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
from whaaaaat.
My bad, you're right, who knows what I was thinking, sorry for the noise
from whaaaaat.
Ah, I found the glitch: the problem is actually in expand.py, not rawlist.py!
from whaaaaat.
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!
from whaaaaat.
fixed with 1e682bc
from whaaaaat.
What does it mean when an item in the incoming choices
is a plain string, and when can it happen? I ask because I still see the chance that this line being executed before key
is assigned...
from whaaaaat.
Related Issues (17)
- Checkbox: inverting ignores disabled entries and selects them even though they are disabled
- Checkbox: selecting all items ignores disabled settings HOT 3
- Checkbox: when the first item is disabled, it is still selected as default selection
- pip install out of date HOT 1
- Dynamic Question Mark HOT 1
- Offer to join the contributer's team HOT 1
- Incompatible with prompt_toolkit version 2.0 HOT 12
- List: redundant line spaces before the list get printed HOT 1
- List question: Choices jump down to window bottom
- Looking for a maintainer? HOT 4
- ImportError: cannot import name 'Token' from prompt_toolkit.token HOT 2
- Support for autocomplete?
- Return list of selected items
- Support for new lines and tabs HOT 2
- default function HOT 2
- Checkbox script is using the name as argument when selecting a field even if a value is provided
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whaaaaat.