update mypy

This commit is contained in:
Maximilian Hils 2021-06-13 17:17:10 +02:00
parent 8cec4a2a80
commit bed008e6d1
3 changed files with 15 additions and 1 deletions

View File

@ -29,6 +29,7 @@ def load_script(path: str) -> typing.Optional[types.ModuleType]:
try:
loader = importlib.machinery.SourceFileLoader(fullname, path)
spec = importlib.util.spec_from_loader(fullname, loader=loader)
assert spec
m = importlib.util.module_from_spec(spec)
loader.exec_module(m)
if not getattr(m, "name", None):

View File

@ -17,6 +17,12 @@ import collections.abc
import pydivert
import pydivert.consts
if typing.TYPE_CHECKING:
class WindowsError(OSError):
@property
def winerror(self) -> int:
return 42
REDIRECT_API_HOST = "127.0.0.1"
REDIRECT_API_PORT = 8085

View File

@ -28,7 +28,14 @@ commands =
python ./test/filename_matching.py
[testenv:mypy]
deps = mypy==0.812
deps =
mypy==0.902
types-certifi==0.1.3
types-Flask==1.1.0
types-Werkzeug==1.0.1
types-requests==0.1.11
types-cryptography==3.3.2
commands =
mypy {posargs}