mirror of
https://github.com/invoke-ai/InvokeAI
synced 2026-04-20 05:36:03 +02:00
* Fix bare except clauses and mutable default arguments Replace bare `except:` with `except Exception:` in sqlite_database.py and mlsd/utils.py to avoid catching KeyboardInterrupt and SystemExit, which can prevent graceful shutdowns and mask critical errors (PEP 8 E722). Replace mutable default arguments (lists) with None in imwatermark/vendor.py to prevent shared state between calls, which is a known Python gotcha that can cause subtle bugs when default mutable objects are modified in place. * add tests for mutable defaults and bare except fixes * Simplify exception propagation tests * Remove unused db initialization in error propagation tests Removed unused database initialization in tests for KeyboardInterrupt and SystemExit. --------- Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_vendor_mutable_defaults.py | ||