From 0af4cc21481c0442fbf175469dcd15c67d7a1e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 10 Feb 2024 13:46:11 +0100 Subject: [PATCH] Use main() function --- autoupdate_app_sources/autoupdate_app_sources.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoupdate_app_sources/autoupdate_app_sources.py b/autoupdate_app_sources/autoupdate_app_sources.py index e10db4d..40ebc13 100644 --- a/autoupdate_app_sources/autoupdate_app_sources.py +++ b/autoupdate_app_sources/autoupdate_app_sources.py @@ -484,7 +484,7 @@ def paste_on_haste(data): sys.exit(1) -if __name__ == "__main__": +def main() -> None: args = [arg for arg in sys.argv[1:] if arg != "--commit-and-create-PR"] if len(args): @@ -522,3 +522,7 @@ if __name__ == "__main__": ) if apps_updated: print(f"Apps updated: {', '.join(apps_updated)}") + + +if __name__ == "__main__": + main()