Silence mypy warnings

This commit is contained in:
Adrian Chaves 2026-06-26 18:53:45 +02:00
parent a212f01160
commit dbee61f2b2
1 changed files with 2 additions and 2 deletions

View File

@ -693,14 +693,14 @@ def test_create_crawler_rejects_spider_object(
) -> None:
runner = runner_cls()
with pytest.raises(ValueError, match="cannot be a spider object"):
runner.create_crawler(DefaultSpider())
runner.create_crawler(DefaultSpider()) # type: ignore[arg-type]
@pytest.mark.parametrize("runner_cls", [AsyncCrawlerRunner, CrawlerRunner])
def test_crawl_rejects_spider_object(runner_cls: type[CrawlerRunnerBase]) -> None:
runner = runner_cls()
with pytest.raises(ValueError, match="cannot be a spider object"):
runner.crawl(DefaultSpider())
runner.crawl(DefaultSpider()) # type: ignore[arg-type]
class ExceptionSpider(scrapy.Spider):