Make mypy succeed with imports on master.py

We get little benefit from our mypy QA checks at the moment, because we skip
imports. This patch is what's needed to make mypy succeed with imports on a
single file: master.py

It also updates mypy to the current version, and enables a QA check.

Mypy bugs I encountered:

dict.update with kwargs not supported:

https://github.com/python/mypy/issues/1031

property setters and getters must be adjacent:

https://github.com/python/mypy/issues/1465
This commit is contained in:
Aldo Cortesi 2017-03-16 16:50:41 +13:00 committed by Aldo Cortesi
parent c0882496e3
commit 39659c7528

View File

@ -1,7 +1,7 @@
import typing
def check_type(name: str, value: typing.Any, typeinfo: type) -> None:
def check_type(name: str, value: typing.Any, typeinfo: typing.Any) -> None:
"""
This function checks if the provided value is an instance of typeinfo
and raises a TypeError otherwise.