mirror of https://github.com/scrapy/scrapy.git
Fix building docs.
This commit is contained in:
parent
d47f142d0f
commit
0d7a5e760d
|
|
@ -21,6 +21,8 @@ from typing import (
|
|||
|
||||
from w3lib.url import safe_url_string
|
||||
|
||||
# a workaround for the docs "more than one target found" problem
|
||||
import scrapy # noqa: TC001
|
||||
from scrapy.http.headers import Headers
|
||||
from scrapy.utils.curl import curl_to_request_kwargs
|
||||
from scrapy.utils.python import to_bytes
|
||||
|
|
@ -36,7 +38,6 @@ if TYPE_CHECKING:
|
|||
# typing.NotRequired and typing.Self require Python 3.11
|
||||
from typing_extensions import Concatenate, NotRequired, Self
|
||||
|
||||
from scrapy import Spider
|
||||
from scrapy.http import Response
|
||||
|
||||
CallbackT = Callable[Concatenate[Response, ...], Any]
|
||||
|
|
@ -252,7 +253,7 @@ class Request(object_ref):
|
|||
request_kwargs.update(kwargs)
|
||||
return cls(**request_kwargs)
|
||||
|
||||
def to_dict(self, *, spider: Spider | None = None) -> dict[str, Any]:
|
||||
def to_dict(self, *, spider: scrapy.Spider | None = None) -> dict[str, Any]:
|
||||
"""Return a dictionary containing the Request's data.
|
||||
|
||||
Use :func:`~scrapy.utils.request.request_from_dict` to convert back into a :class:`~scrapy.Request` object.
|
||||
|
|
|
|||
Loading…
Reference in New Issue