Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Typing: switch to a newer version of MyPy to check types

Pascal Corpet70dddfe2b293
diff --git a/tests/CrawlerProcess/asyncio_deferred_signal.py b/tests/CrawlerProcess/asyncio_deferred_signal.py
index 46c2a12a4..bdd3c1fef 100644
--- a/tests/CrawlerProcess/asyncio_deferred_signal.py
+++ b/tests/CrawlerProcess/asyncio_deferred_signal.py
@@ -1,5 +1,6 @@
import asyncio
import sys
+from typing import Optional
from scrapy import Spider
from scrapy.crawler import CrawlerProcess
@@ -31,6 +32,7 @@ class UrlSpider(Spider):
if __name__ == "__main__":
+ ASYNCIO_EVENT_LOOP: Optional[str]
try:
ASYNCIO_EVENT_LOOP = sys.argv[1]
except IndexError:
diff --git a/tox.ini b/tox.ini
index 8167aff96..4c4bbff6e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -35,7 +35,10 @@ install_command =
[testenv:typing]
basepython = python3
deps =
- mypy==0.780
+ lxml-stubs==0.2.0
+ mypy==0.910
+ types-pyOpenSSL==20.0.3
+ types-setuptools==57.0.0
commands =
mypy --show-error-codes {posargs: scrapy tests}