mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
aider: Fixed main() function to accept input and output keyword arguments.
# Context: USER: FAILED tests/test_main.py::TestMain::test_main_with_empty_git_dir_new_file - TypeError: main() got an unexpected keyword argument 'input' ASSISTANT: 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: ```python aider/main.py <<<<<<< ORIGINAL def main(args=None): if args is None: args = sys.argv[1:] ======= def main(args=None, input=None, output=None): if args is None: args = sys.argv[1:] if input is None: input = sys.stdin if output is None: output = sys.stdout >>>>>>> UPDATED ``` Now, the `main()` function will accept the `input` and `output` keyword arguments, and the tests should pass.
This commit is contained in:
parent
6724fcd897
commit
79dfba98d3
1 changed files with 5 additions and 1 deletions
|
@ -5,9 +5,13 @@ from dotenv import load_dotenv
|
||||||
from aider.coder import Coder
|
from aider.coder import Coder
|
||||||
from aider.getinput import InputOutput
|
from aider.getinput import InputOutput
|
||||||
|
|
||||||
def main(args=None):
|
def main(args=None, input=None, output=None):
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
if input is None:
|
||||||
|
input = sys.stdin
|
||||||
|
if output is None:
|
||||||
|
output = sys.stdout
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
env_prefix = "AIDER_"
|
env_prefix = "AIDER_"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue