mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-01-26 19:29:54 +00:00
fix: use mock.patch on total_tqdm patch
This commit is contained in:
@@ -49,12 +49,8 @@ def disable_safe_unpickle():
|
||||
|
||||
@contextmanager
|
||||
def pause_total_tqdm():
|
||||
orig = opts.data.get("multiple_tqdm", True)
|
||||
try:
|
||||
opts.data["multiple_tqdm"] = False
|
||||
with patch.dict(opts.data, {"multiple_tqdm": False}, clear=False):
|
||||
yield
|
||||
finally:
|
||||
opts.data["multiple_tqdm"] = orig
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
Reference in New Issue
Block a user