aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-03-16 16:50:41 +1300
committerAldo Cortesi <aldo@corte.si>2017-03-19 10:32:22 +1300
commit39659c752884ae31ccc14bbe247f3918f97bab9c (patch)
tree41af8bf9a39253327b05c812c8d21f94e0cbb108
parentc0882496e37bbe6985b67ad94bdff72524b5b668 (diff)
downloadmitmproxy-39659c752884ae31ccc14bbe247f3918f97bab9c.tar.gz
mitmproxy-39659c752884ae31ccc14bbe247f3918f97bab9c.tar.bz2
mitmproxy-39659c752884ae31ccc14bbe247f3918f97bab9c.zip
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
-rw-r--r--mitmproxy/utils/typecheck.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py
index e8e2121e..5df4ea4b 100644
--- a/mitmproxy/utils/typecheck.py
+++ b/mitmproxy/utils/typecheck.py
@@ -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.