This commit is contained in:
Paul Gauthier 2023-05-13 12:44:07 -07:00
parent a4a006c936
commit e7ae9a540b

View file

@ -118,7 +118,6 @@ Added import statement for sys module in test_main.py.
> Added aider/main.py to the chat
---
#### > I am getting this error: FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: main() got an unexpected keyword argument 'input'
I apologize for the confusion. It seems I made a mistake in the `main()` function definition in `aider/main.py`. The `main()` function should accept `input` and `output` keyword arguments. Here's the fix:
@ -142,10 +141,10 @@ def main(args=None, input=None, output=None):
Now, the `main()` function will accept the `input` and `output` keyword arguments, and the tests should pass.
---
> Applied edit to aider/main.py
> Commit 79dfba9 aider: Fixed main() function to accept input and output keyword arguments.
---
#### > we need to pass those into InputOutput and to prompt_toolkit right?
Yes, you're right. We need to pass the `input` and `output` arguments to the `InputOutput` class and then to the `prompt_toolkit.prompt()` function. Here's how to modify the `aider/getinput.py` and `aider/main.py` files:
@ -205,12 +204,12 @@ aider/main.py
These changes will ensure that the `input` and `output` arguments are passed to the `InputOutput` class and then to the `prompt_toolkit.prompt()` function.
---
> Applied edit to aider/getinput.py
> Applied edit to aider/getinput.py
> Applied edit to aider/main.py
> Commit cea9d2a aider: Updated InputOutput class to accept input and output arguments and passed them to prompt_toolkit.prompt() function.
---
#### > FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: prompt() got an unexpected keyword argument 'input'
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: