Enable E722: replace bare except with Exception

This commit is contained in:
Krzysztof Rudnicki 2025-11-30 15:12:34 +01:00
parent 24d15e831f
commit 84b80863d6
2 changed files with 1 additions and 2 deletions

View File

@ -71,7 +71,7 @@ while True:
next_button_url = next_button.get_attribute("href") next_button_url = next_button.get_attribute("href")
driver.get(next_button_url) driver.get(next_button_url)
except: except Exception:
# If the 'Next' button is not found, it means we've reached the last image # 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.") logging.info("No 'Next' button found. Reached the end of images.")
break break

View File

@ -68,7 +68,6 @@ ignore = [
"DTZ005", # datetime.now without tz - acceptable for local scripts "DTZ005", # datetime.now without tz - acceptable for local scripts
"E741", # ambiguous-variable-name - sometimes intentional (e.g. l for list) "E741", # ambiguous-variable-name - sometimes intentional (e.g. l for list)
"DTZ004", # datetime.utcfromtimestamp - acceptable "DTZ004", # datetime.utcfromtimestamp - acceptable
"E722", # bare-except - will be fixed where critical
"PERF401", # manual-list-comprehension - style preference "PERF401", # manual-list-comprehension - style preference
"RUF005", # collection-literal-concatenation - style preference "RUF005", # collection-literal-concatenation - style preference
"SIM102", # collapsible-if - style preference "SIM102", # collapsible-if - style preference