Skip to content

Commit a8db4ec

Browse files
committed
include case for string/char input
1 parent 245daf7 commit a8db4ec

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/utils/misc/uinput.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def uinput(console: Console, msg: str, qtype: int) -> Any:
1212
qtype -- question type, whether y/N, string input or number input
1313
1 is yes or no input
1414
2 is number/list input
15+
3 is for string or char input
1516
1617
Returns:
1718
The evaluated input based on the user response, e.g.:
@@ -35,5 +36,13 @@ def uinput(console: Console, msg: str, qtype: int) -> Any:
3536
), end=" "
3637
)
3738
return input()
39+
case 3:
40+
console.print(
41+
(
42+
f"{msg} [bold][CHAR/STRING INPUT"
43+
", separate by comma ','][/bold]"
44+
), end=" "
45+
)
46+
return input()
3847

3948
return False

0 commit comments

Comments
 (0)