From 55d35405291412afd5de4d9017b3611a3ff5c9b4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 13 May 2023 07:12:42 -0700 Subject: [PATCH] aider: Fixed `prompt()` function call in `get_input()` method to pass `stdin` and `stdout` arguments instead of `input` and `output`. # Context: USER: FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: prompt() got an unexpected keyword argument 'input' ASSISTANT: I apologize for the confusion. It seems I made a mistake in the `prompt_toolkit.prompt()` function call. The `prompt()` function accepts `stdin` and `stdout` arguments instead of `input` and `output`. Here's the fix: Update the `prompt()` function call in the `get_input()` method in `aider/getinput.py`: ```python aider/getinput.py <<<<<<< ORIGINAL input=self.input, output=self.output, ======= stdin=self.input, stdout=self.output, >>>>>>> UPDATED ``` These changes will ensure that the `input` and `output` arguments are passed correctly to the `prompt_toolkit.prompt()` function. --- aider/getinput.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/getinput.py b/aider/getinput.py index 487b438d2..582a1f517 100644 --- a/aider/getinput.py +++ b/aider/getinput.py @@ -125,8 +125,8 @@ class InputOutput: style=style, reserve_space_for_menu=4, complete_style=CompleteStyle.MULTI_COLUMN, - input=self.input, - output=self.output, + stdin=self.input, + stdout=self.output, ) if line.strip() == "{" and not multiline_input: multiline_input = True