Merge pull request #5215 from pcorpet/types

Typing: switch to a newer version of MyPy to check types
This commit is contained in:
Mikhail Korobov 2021-07-22 17:52:48 +05:00 committed by GitHub
commit ff272d6332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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}