Remove tempdir changes

These are now in a separate PR
This commit is contained in:
Paul O'Leary McCann 2023-02-16 15:46:33 +09:00
parent 31d5995550
commit b308e2b941

View File

@ -1032,12 +1032,12 @@ def make_tempdir() -> Generator[Path, None, None]:
YIELDS (Path): The path of the temp directory.
"""
d = Path(tempfile.mkdtemp())
yield d
try:
with tempfile.TemporaryDirectory() as td:
yield Path(td)
shutil.rmtree(str(d))
except PermissionError as e:
warnings.warn(Warnings.W091.format(dir=td, msg=e))
warnings.warn(Warnings.W091.format(dir=d, msg=e))
def is_cwd(path: Union[Path, str]) -> bool: