Ignore typing warning in test

This commit is contained in:
Eugenio Lacuesta 2021-04-12 10:43:02 -03:00
parent b6f77806b0
commit d8d1dc5b50
No known key found for this signature in database
GPG Key ID: DA3EF2D0913E9810
2 changed files with 2 additions and 4 deletions

View File

@ -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 = {

View File

@ -37,7 +37,7 @@ basepython = python3
deps =
mypy==0.780
commands =
mypy {posargs: scrapy tests}
mypy --show-error-codes {posargs: scrapy tests}
[testenv:security]
basepython = python3