From f66c272fc2f78c62bd123b17703cb4fbc30c897f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 17 Sep 2024 10:03:56 +0200 Subject: [PATCH] linkcheck: move argparsing to main function --- checks/linkcheck/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/checks/linkcheck/main.py b/checks/linkcheck/main.py index 4d00f78..a7227c6 100644 --- a/checks/linkcheck/main.py +++ b/checks/linkcheck/main.py @@ -121,7 +121,7 @@ Usage: python main.py [action] sys.exit(status) -if __name__ == "__main__": +def main() -> None: if len(sys.argv) < 2: print_usage(1) action = sys.argv[1] @@ -144,3 +144,7 @@ if __name__ == "__main__": print_usage(0) else: print_usage(1) + + +if __name__ == "__main__": + main()