mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
lint
This commit is contained in:
parent
3c1681942a
commit
1b57a6a703
2 changed files with 5 additions and 3 deletions
5
main.py
5
main.py
|
@ -1,10 +1,10 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from coder import Coder
|
from coder import Coder
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
env_prefix = "CODER_"
|
env_prefix = "CODER_"
|
||||||
|
@ -19,7 +19,7 @@ def main():
|
||||||
"--history-file",
|
"--history-file",
|
||||||
metavar="HISTORY_FILE",
|
metavar="HISTORY_FILE",
|
||||||
default=os.environ.get("CODER_HISTORY_FILE", ".coder.history"),
|
default=os.environ.get("CODER_HISTORY_FILE", ".coder.history"),
|
||||||
help="Specify the history file (default: .coder.history or value from CODER_HISTORY_FILE environment variable)",
|
help="Specify the history file (default: .coder.history)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--model",
|
"--model",
|
||||||
|
@ -75,6 +75,7 @@ def main():
|
||||||
|
|
||||||
coder.run()
|
coder.run()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
status = main()
|
status = main()
|
||||||
sys.exit(status)
|
sys.exit(status)
|
||||||
|
|
3
utils.py
3
utils.py
|
@ -52,6 +52,7 @@ def quoted_file(fname):
|
||||||
prompt += "\n```\n"
|
prompt += "\n```\n"
|
||||||
return prompt
|
return prompt
|
||||||
|
|
||||||
|
|
||||||
def strip_quoted_wrapping(res, fname=None):
|
def strip_quoted_wrapping(res, fname=None):
|
||||||
if not res:
|
if not res:
|
||||||
return res
|
return res
|
||||||
|
@ -68,4 +69,4 @@ def strip_quoted_wrapping(res, fname=None):
|
||||||
if res and res[-1] != "\n":
|
if res and res[-1] != "\n":
|
||||||
res += "\n"
|
res += "\n"
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue