From f186acd9e171a602fe243347e20a482888d0f954 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Mon, 16 Sep 2024 12:51:19 +0200 Subject: [PATCH] Remove unnecessary shutil import --- stgpytools/types/file.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stgpytools/types/file.py b/stgpytools/types/file.py index 36f564a..fd5f9e5 100644 --- a/stgpytools/types/file.py +++ b/stgpytools/types/file.py @@ -94,10 +94,8 @@ def mkdirp(self, mode: int = 0o777) -> None: def rmdirs(self, missing_ok: bool = False, ignore_errors: bool = True) -> None: """Remove the dir path with its contents.""" - from shutil import rmtree - try: - return rmtree(str(self.get_folder()), ignore_errors) + return shutil.rmtree(str(self.get_folder()), ignore_errors) except FileNotFoundError: if not missing_ok: raise