Lines Matching refs:self

47     def select_compile_option(self) -> dict:
83 result = self._list_promt(arg.arg_name, 'select {} value'.format(
88 def select_product(self) -> dict:
91 os_level = self._select_os_level()
115 product = self._list_promt('product', 'Which product do you need?',
120 def _select_os_level(self) -> str:
135 return self._list_promt('os_level', 'Which os_level do you need?',
138 def _list_promt(self, name: str, message: str, choices: list, **kwargs):
139 questions = self._get_questions('list', name, message, choices)
141 return self._prompt(questions=questions, **kwargs)
143 def _get_questions(self, promt_type: str, name: str, message: str, choices: list):
154 def _prompt(self, questions: list, answers=None, **kwargs):
204 application = self._question(message, **_kwargs)
232 def _question(self, message: str, **kwargs):
312 def __init__(self, choices: list, **kwargs):
313 self.selected_option_index = 0
314 self.answered = False
315 self.choices = choices
316 self._init_choices(choices)
317 super(InquirerControl, self).__init__(self._get_choice_tokens,
321 def choice_count(self):
322 return len(self.choices)
324 def get_selection(self):
325 return self.choices[self.selected_option_index]
327 def _init_choices(self, choices: list, default=None):
329 self.choices = [] # list (name, value, disabled)
333 self.choices.append((choice, None, None))
337 self.choices.append((choice, choice, None))
342 self.choices.append((name, value, disabled))
344 self.selected_option_index = index
347 def _get_choice_tokens(self, cli):
352 selected = (index == self.selected_option_index)
357 self.selected_option_index = index
358 self.answered = True
382 for i, choice in enumerate(self.choices):