mirror of https://github.com/scrapy/scrapy.git
scrapy.utils.data_path type hint change (#6133)
This commit is contained in:
parent
6587556af9
commit
eafe828484
|
|
@ -1,7 +1,9 @@
|
|||
import os
|
||||
import warnings
|
||||
from importlib import import_module
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
from scrapy.exceptions import NotConfigured
|
||||
from 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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue