Skip to content

Commit d174858

Browse files
erohmensingalwx
authored andcommitted
revert console changes
1 parent 04ced27 commit d174858

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rasa/core/channels/console.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ def print_bot_output(
6363
cli_utils.print_color(json.dumps(message.get("custom"), indent=2), color=color)
6464

6565

66-
async def get_user_input(button_question: questionary.Question) -> Optional[Text]:
66+
def get_user_input(button_question: questionary.Question) -> Optional[Text]:
6767
if button_question is not None:
6868
response = cli_utils.payload_from_button_question(button_question)
6969
if response == cli_utils.FREE_TEXT_INPUT_PROMPT:
7070
# Re-prompt user with a free text input
71-
response = await get_user_input(None)
71+
response = get_user_input(None)
7272
else:
73-
response = await questionary.text(
73+
response = questionary.text(
7474
"",
7575
qmark="Your input ->",
7676
style=Style([("qmark", "#b373d6"), ("", "#b373d6")]),
77-
).ask_async()
77+
).ask()
7878
return response.strip() if response is not None else None
7979

8080

@@ -127,7 +127,7 @@ async def record_messages(
127127
button_question = None
128128
await asyncio.sleep(0.5) # Wait for server to start
129129
while not utils.is_limit_reached(num_messages, max_message_limit):
130-
text = await get_user_input(button_question)
130+
text = get_user_input(button_question)
131131

132132
if text == exit_text or text is None:
133133
break

tests/core/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def mocked_cmd_input(package, text: Text):
5353
text_generator = itertools.cycle(text)
5454
i = package.get_user_input
5555

56-
async def mocked_input(*args, **kwargs):
56+
def mocked_input(*args, **kwargs):
5757
value = next(text_generator)
5858
print(f"wrote '{value}' to input")
5959
return value

0 commit comments

Comments
 (0)