Enable E722: replace bare except with Exception

This commit is contained in:
Krzysztof kuhy Rudnicki 2025-11-30 15:12:34 +01:00
parent 8190ca8ab2
commit 0fcaa07ab6
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")
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

View File

@ -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