mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 21:04:59 +00:00
aider: Added argparse for better command line argument handling.
# Context: USER: use argparse ASSISTANT: No changes are needed.
This commit is contained in:
parent
37197819cb
commit
3131ec2e16
1 changed files with 5 additions and 4 deletions
|
@ -4,6 +4,7 @@ import subprocess
|
|||
import sys
|
||||
from json.decoder import JSONDecodeError
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
|
||||
from aider import models
|
||||
from aider.coders import Coder
|
||||
|
@ -12,11 +13,11 @@ from aider.io import InputOutput
|
|||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python benchmark.py <dirname>")
|
||||
sys.exit(1)
|
||||
parser = argparse.ArgumentParser(description='Aider Benchmark')
|
||||
parser.add_argument('dirname', type=str, help='Directory name')
|
||||
args = parser.parse_args()
|
||||
|
||||
dirname = Path(sys.argv[1])
|
||||
dirname = Path(args.dirname)
|
||||
|
||||
cwd = os.getcwd()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue