From cc772d507418e4b3d80a242697dd35ef3f9cab9f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 29 Aug 2024 09:13:12 -0700 Subject: [PATCH] refactor: move main logic into main() function --- aider/report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aider/report.py b/aider/report.py index 356da81e8..6025c36ca 100644 --- a/aider/report.py +++ b/aider/report.py @@ -71,7 +71,7 @@ def report_uncaught_exceptions(): sys.excepthook = exception_handler -if __name__ == "__main__": +def main(): title = None if len(sys.argv) > 2: # 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() report_github_issue(issue_text, title) + +if __name__ == "__main__": + main()