From 2b0155c24da8f1b74d9a44935f1cef4975be3697 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sun, 19 Jul 2026 22:45:49 +0530 Subject: [PATCH] fix: 3 bare excepts should catch ValueError instead of BaseException --- scripts/extract_rankings.py | 2 +- scripts/extract_rankings_v2.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/extract_rankings.py b/scripts/extract_rankings.py index 19bdf332..36bdb88c 100644 --- a/scripts/extract_rankings.py +++ b/scripts/extract_rankings.py @@ -64,7 +64,7 @@ def extract_rankings(): # Check if Rank is numeric, if not skip (it might be a comment row) try: rank = int(rank_val) - except: + except ValueError: continue item = { diff --git a/scripts/extract_rankings_v2.py b/scripts/extract_rankings_v2.py index 295a060d..a3cae61a 100644 --- a/scripts/extract_rankings_v2.py +++ b/scripts/extract_rankings_v2.py @@ -18,7 +18,7 @@ def safe_float(val): if match: try: return float(match.group(1)) - except: + except ValueError: pass return 0.0 @@ -96,7 +96,7 @@ def extract_rankings(): try: rank = int(rank_val) - except: + except ValueError: continue if i == 0: