From 351c0fe787524d7874ce1403759d04afa3abc3fa Mon Sep 17 00:00:00 2001 From: Andrei Vishniakov <31008759+avishniakov@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:22:35 +0200 Subject: [PATCH] coderabbitai --- tests/conftest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5ec3260..d2be666 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,6 +13,7 @@ # permissions and limitations under the License. +import contextlib import os import sys import shutil @@ -101,9 +102,7 @@ def clean_zenml_client( # remove all traces, and change working directory back to base path os.chdir(orig_cwd) if sys.platform == "win32": - try: + with contextlib.suppress(Exception): shutil.rmtree(str(tmp_path)) - except: - pass else: shutil.rmtree(str(tmp_path))