From 84b80863d66efadd96cffed112c81f06fe18d50f Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 30 Nov 2025 15:12:34 +0100 Subject: [PATCH] Enable E722: replace bare except with Exception --- PYTHON/scapeWebsite/scrape_comics.py | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/PYTHON/scapeWebsite/scrape_comics.py b/PYTHON/scapeWebsite/scrape_comics.py index d071be8..b3c0fa4 100644 --- a/PYTHON/scapeWebsite/scrape_comics.py +++ b/PYTHON/scapeWebsite/scrape_comics.py @@ -71,7 +71,7 @@ while True: next_button_url = next_button.get_attribute("href") driver.get(next_button_url) - except: + except Exception: # If the 'Next' button is not found, it means we've reached the last image logging.info("No 'Next' button found. Reached the end of images.") break diff --git a/pyproject.toml b/pyproject.toml index df6fb1e..af27a12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,6 @@ ignore = [ "DTZ005", # datetime.now without tz - acceptable for local scripts "E741", # ambiguous-variable-name - sometimes intentional (e.g. l for list) "DTZ004", # datetime.utcfromtimestamp - acceptable - "E722", # bare-except - will be fixed where critical "PERF401", # manual-list-comprehension - style preference "RUF005", # collection-literal-concatenation - style preference "SIM102", # collapsible-if - style preference