Skip to content

Commit e528101

Browse files
committed
Add docstrings
1 parent 7d63cc7 commit e528101

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/clabe/ui/questionary_ui_helper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,17 @@ def _ask_sync(question):
4646

4747

4848
class QuestionaryUIHelper(_UiHelperBase):
49+
"""UI helper implementation using Questionary for interactive prompts."""
4950
def __init__(self, style: Optional[questionary.Style] = None) -> None:
51+
"""Initializes the QuestionaryUIHelper with an optional custom style."""
5052
self.style = style or custom_style
5153

5254
def print(self, message: str) -> None:
55+
"""Prints a message with custom styling."""
5356
questionary.print(message, "bold italic")
5457

5558
def input(self, prompt: str) -> str:
59+
"""Prompts the user for input with custom styling."""
5660
return _ask_sync(questionary.text(prompt, style=self.style)) or ""
5761

5862
def prompt_pick_from_list(self, value: List[str], prompt: str, **kwargs) -> Optional[str]:
@@ -87,12 +91,15 @@ def prompt_pick_from_list(self, value: List[str], prompt: str, **kwargs) -> Opti
8791
return result
8892

8993
def prompt_yes_no_question(self, prompt: str) -> bool:
94+
"""Prompts the user with a yes/no question using custom styling."""
9095
return _ask_sync(questionary.confirm(prompt, style=self.style)) or False
9196

9297
def prompt_text(self, prompt: str) -> str:
98+
"""Prompts the user for generic text input using custom styling."""
9399
return _ask_sync(questionary.text(prompt, style=self.style)) or ""
94100

95101
def prompt_float(self, prompt: str) -> float:
102+
"""Prompts the user for a float input using custom styling."""
96103
while True:
97104
try:
98105
value_str = _ask_sync(questionary.text(prompt, style=self.style))

0 commit comments

Comments
 (0)