Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

fixed mypy typing error

Alex0a21a9457b7a
diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py
index f9dfa53e3..94b0b1b70 100644
--- a/scrapy/pipelines/files.py
+++ b/scrapy/pipelines/files.py
@@ -37,7 +37,7 @@ from scrapy.utils.request import referer_str
logger = logging.getLogger(__name__)
-def _to_string(path: Union[str, PathLike]):
+def _to_string(path: Union[str, PathLike]) -> str:
return str(path) # convert a Path object to string