|
|
|
@ -102,7 +102,10 @@ def handle_input(
|
|
|
|
user_input = input("").strip()
|
|
|
|
user_input = input("").strip()
|
|
|
|
if check_type is not False:
|
|
|
|
if check_type is not False:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
isinstance(eval(user_input), check_type) # fixme: remove eval
|
|
|
|
if check_type is bool and isinstance(user_input, str):
|
|
|
|
|
|
|
|
if user_input.lower() in ['true', '1', 't', 'y', 'yes', 'yup']: return True
|
|
|
|
|
|
|
|
if user_input.lower() in ['false', '0', 'f', 'n', 'no', 'nope']: return False
|
|
|
|
|
|
|
|
raise ValueError
|
|
|
|
return check_type(user_input)
|
|
|
|
return check_type(user_input)
|
|
|
|
except:
|
|
|
|
except:
|
|
|
|
console.print(
|
|
|
|
console.print(
|
|
|
|
|