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

This commit is contained in:
Pascal Corpet 2021-07-21 17:10:10 +02:00
parent ee2df97bbd
commit 70dddfe2b2
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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}