aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/stateobject.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-03-16 16:50:41 +1300
committerAldo Cortesi <aldo@corte.si>2017-03-17 08:13:47 +1300
commit5192810ff6a41e62e41d16fcf636663d177a1232 (patch)
treec3fc61680fb63af27df357a198584610772a47b0 /mitmproxy/stateobject.py
parenteac210829e51d988b7090b448037de6d41d5dfe9 (diff)
downloadmitmproxy-5192810ff6a41e62e41d16fcf636663d177a1232.tar.gz
mitmproxy-5192810ff6a41e62e41d16fcf636663d177a1232.tar.bz2
mitmproxy-5192810ff6a41e62e41d16fcf636663d177a1232.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
Diffstat (limited to 'mitmproxy/stateobject.py')
-rw-r--r--mitmproxy/stateobject.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/stateobject.py b/mitmproxy/stateobject.py
index 14159001..a0deaec9 100644
--- a/mitmproxy/stateobject.py
+++ b/mitmproxy/stateobject.py
@@ -1,5 +1,6 @@
from typing import Any
from typing import List
+from typing import MutableMapping # noqa
from mitmproxy.types import serializable
@@ -19,7 +20,7 @@ class StateObject(serializable.Serializable):
or StateObject instances themselves.
"""
- _stateobject_attributes = None
+ _stateobject_attributes = None # type: MutableMapping[str, Any]
"""
An attribute-name -> class-or-type dict containing all attributes that
should be serialized. If the attribute is a class, it must implement the