From 6b51d5ceb7e3bc7116c7ef239bae02b20fb04685 Mon Sep 17 00:00:00 2001 From: hofiorg Date: Fri, 15 Mar 2024 23:36:17 +0100 Subject: [PATCH] check_urls - removed unnecessary code and comments --- scripts/check_urls.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/check_urls.py b/scripts/check_urls.py index 428235c..48367a8 100755 --- a/scripts/check_urls.py +++ b/scripts/check_urls.py @@ -28,14 +28,11 @@ def check_urls(url_data): and print the result using emojis. """ if 'urls' in url_data: - if not url_data['urls']: # Check if the list is empty + if not url_data['urls']: print("No URLs to check.") return if url_data['urls']: max_name_length = max(len(item['name']) for item in url_data['urls']) - else: - max_name_length = 0 # or some default value that makes sense for your use case - for item in url_data['urls']: name = item['name'] @@ -71,5 +68,4 @@ def check_urls(url_data): json_file_path = sys.argv[1] json_data = read_json_file(json_file_path) - # Check URLs check_urls(json_data)