scrapy / scrapy

@@ -126,10 +126,10 @@
Loading
126 126
127 127
    __repr__ = __str__
128 128
129 -
    def copy(self) -> RequestTypeVar:
129 +
    def copy(self) -> "Request":
130 130
        return self.replace()
131 131
132 -
    def replace(self, *args, **kwargs) -> RequestTypeVar:
132 +
    def replace(self, *args, **kwargs) -> "Request":
133 133
        """Create a new Request with the same attributes except for those given new values"""
134 134
        for x in self.attributes:
135 135
            kwargs.setdefault(x, getattr(self, x))

@@ -10,7 +10,7 @@
Loading
10 10
import warnings
11 11
from typing import Optional, Tuple
12 12
13 -
from scrapy.http.request import Request, RequestTypeVar
13 +
from scrapy.http.request import Request
14 14
from scrapy.utils.deprecate import create_deprecated_class
15 15
16 16
@@ -42,7 +42,7 @@
Loading
42 42
    def dumps_kwargs(self) -> dict:
43 43
        return self._dumps_kwargs
44 44
45 -
    def replace(self, *args, **kwargs) -> RequestTypeVar:
45 +
    def replace(self, *args, **kwargs) -> Request:
46 46
        body_passed = kwargs.get('body', None) is not None
47 47
        data = kwargs.pop('data', None)
48 48
        data_passed = data is not None
Files Coverage
scrapy 88.19%
Project Totals (162 files) 88.19%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading