Scrapy, a fast high-level web crawling & scraping framework for Python.
scrapy.utils.data_path type hint change (#6133)
cakemdeafe828484d9
diff --git a/scrapy/utils/project.py b/scrapy/utils/project.pyindex a2c224b90..de3c8eaf9 100644--- a/scrapy/utils/project.py+++ b/scrapy/utils/project.py@@ -1,7 +1,9 @@import osimport warningsfrom importlib import import_module+from os import PathLikefrom pathlib import Path+from typing import Unionfrom scrapy.exceptions import NotConfiguredfrom scrapy.settings import Settings@@ -44,7 +46,7 @@ def project_data_dir(project: str = "default") -> str:return str(d)-def data_path(path: str, createdir: bool = False) -> str:+def data_path(path: Union[str, PathLike], createdir: bool = False) -> str:"""Return the given path joined with the .scrapy data directory.If given an absolute path, return it unmodified.