Should remove most of the mypy errors for parse() in user spiders (if they use older mypy Spider.parse() will appear untyped so no override error either). Doesn't help with scrapy-poet's callbacks that narrow down Response to DummyResponse: https://github.com/scrapinghub/scrapy-poet/issues/179
This should probably have typing tests, I'll do that later.
Based on https://stackoverflow.com/questions/77160087/correct-typing-of-a-method-without-a-fixed-signature
Should remove most of the mypy errors for parse() in user spiders (if they use older mypy Spider.parse() will appear untyped so no override error either). Doesn't help with scrapy-poet's callbacks that narrow down
Response
toDummyResponse
: https://github.com/scrapinghub/scrapy-poet/issues/179This should probably have typing tests, I'll do that later.