From c4589627421859312960f341cd7f73e1d9ecc796 Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Thu, 26 Jan 2023 15:26:41 +0900 Subject: [PATCH] Type fix Also fix variable name --- spacy/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/util.py b/spacy/util.py index fec53c69f..caf63aa91 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -1035,9 +1035,9 @@ def make_tempdir() -> Generator[Path, None, None]: try: with tempfile.TemporaryDirectory() as td: - yield td + yield Path(td) except PermissionError as e: - warnings.warn(Warnings.W091.format(dir=d, msg=e)) + warnings.warn(Warnings.W091.format(dir=td, msg=e)) def is_cwd(path: Union[Path, str]) -> bool: