mirror of https://github.com/scrapy/scrapy.git
Ignore typing warning in test
This commit is contained in:
parent
b6f77806b0
commit
d8d1dc5b50
|
|
@ -97,13 +97,11 @@ except ImportError:
|
|||
else:
|
||||
TestDataClass = make_dataclass("TestDataClass", [("name", str), ("url", str), ("price", int)])
|
||||
|
||||
class _dataclass_spider(DictItemsSpider):
|
||||
class DataClassItemsSpider(DictItemsSpider): # type: ignore[no-redef]
|
||||
def parse_item(self, response):
|
||||
item = super().parse_item(response)
|
||||
return TestDataClass(**item)
|
||||
|
||||
DataClassItemsSpider = _dataclass_spider
|
||||
|
||||
|
||||
class ItemZeroDivisionErrorSpider(TestSpider):
|
||||
custom_settings = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue