Skip to content

Commit ca5c812

Browse files
committed
move theming into printing function
1 parent fec57ea commit ca5c812

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/inquirer/render/console/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def _print_hint(self, render):
9595
msg_template = (
9696
"{t.move_up}{t.clear_eol}{color}{msg}"
9797
)
98-
hint, color = render.get_hint()
98+
hint = render.get_hint()
99+
color = self._theme.Checkbox.selection_color
99100
if hint:
100101
self.print_str(f"\n{msg_template}", msg=hint, color=color, lf=not render.title_inline, tq=self._theme.Question)
101102

src/inquirer/render/console/_checkbox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ def get_hint(self):
1818
try:
1919
hint = self.question.hints[self.question.choices[self.current]]
2020
if hint:
21-
return hint, self.theme.Checkbox.selection_color
21+
return hint
2222
else :
23-
return "\r", ""
23+
return "\r"
2424
except KeyError:
25-
return "\r", ""
25+
return "\r"
2626

2727
def default_choices(self):
2828
default = self.question.default or []

0 commit comments

Comments
 (0)