mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
refactor: Use sys.argv instead of argparse for model arg
This commit is contained in:
parent
3f49acf390
commit
4e608dbd77
1 changed files with 6 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from history_prompts import history_prompt
|
from history_prompts import history_prompt
|
||||||
|
@ -70,11 +70,10 @@ def run_plain_git_log():
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Update HISTORY.md using aider.")
|
model_name = "o3"
|
||||||
parser.add_argument(
|
if len(sys.argv) > 1:
|
||||||
"model", nargs="?", default="o3", help="The model to use with aider (default: o3)"
|
model_name = sys.argv[1]
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
# Get the git log and diff output
|
# Get the git log and diff output
|
||||||
log_content = run_git_log()
|
log_content = run_git_log()
|
||||||
plain_log_content = run_plain_git_log()
|
plain_log_content = run_plain_git_log()
|
||||||
|
@ -143,7 +142,7 @@ def main():
|
||||||
"--no-git",
|
"--no-git",
|
||||||
"--no-auto-lint",
|
"--no-auto-lint",
|
||||||
"--model",
|
"--model",
|
||||||
args.model,
|
model_name,
|
||||||
]
|
]
|
||||||
subprocess.run(cmd)
|
subprocess.run(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue