From 941b7c7dfbd0fd1a061fd4a21a69c85e45858efc Mon Sep 17 00:00:00 2001 From: Dowon Date: Tue, 18 Feb 2025 23:01:44 +0900 Subject: [PATCH] fix: use mock.patch on total_tqdm patch --- aaaaaa/helper.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/aaaaaa/helper.py b/aaaaaa/helper.py index db1a371..a296cd1 100644 --- a/aaaaaa/helper.py +++ b/aaaaaa/helper.py @@ -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