mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: move main logic into main() function
This commit is contained in:
parent
68a4f58480
commit
cc772d5074
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,7 @@ def report_uncaught_exceptions():
|
||||||
sys.excepthook = exception_handler
|
sys.excepthook = exception_handler
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
title = None
|
title = None
|
||||||
if len(sys.argv) > 2:
|
if len(sys.argv) > 2:
|
||||||
# Use the first command-line argument as the title and the second as the issue text
|
# Use the first command-line argument as the title and the second as the issue text
|
||||||
|
@ -90,3 +90,6 @@ if __name__ == "__main__":
|
||||||
issue_text = sys.stdin.read().strip()
|
issue_text = sys.stdin.read().strip()
|
||||||
|
|
||||||
report_github_issue(issue_text, title)
|
report_github_issue(issue_text, title)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue