diff options
Diffstat (limited to 'mitmproxy/io')
-rw-r--r-- | mitmproxy/io/compat.py | 4 | ||||
-rw-r--r-- | mitmproxy/io/io.py | 4 | ||||
-rw-r--r-- | mitmproxy/io/tnetstring.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/mitmproxy/io/compat.py b/mitmproxy/io/compat.py index 231fa3b8..cddb8b01 100644 --- a/mitmproxy/io/compat.py +++ b/mitmproxy/io/compat.py @@ -127,8 +127,8 @@ def convert_300_4(data): return data -client_connections = {} # type: Mapping[str, str] -server_connections = {} # type: Mapping[str, str] +client_connections: Mapping[str, str] = {} +server_connections: Mapping[str, str] = {} def convert_4_5(data): diff --git a/mitmproxy/io/io.py b/mitmproxy/io/io.py index 50e26f49..01f1e884 100644 --- a/mitmproxy/io/io.py +++ b/mitmproxy/io/io.py @@ -11,11 +11,11 @@ from mitmproxy import websocket from mitmproxy.io import compat from mitmproxy.io import tnetstring -FLOW_TYPES = dict( +FLOW_TYPES: Dict[str, Type[flow.Flow]] = dict( http=http.HTTPFlow, websocket=websocket.WebSocketFlow, tcp=tcp.TCPFlow, -) # type: Dict[str, Type[flow.Flow]] +) class FlowWriter: diff --git a/mitmproxy/io/tnetstring.py b/mitmproxy/io/tnetstring.py index 82c92f33..aa1f5670 100644 --- a/mitmproxy/io/tnetstring.py +++ b/mitmproxy/io/tnetstring.py @@ -53,7 +53,7 @@ def dumps(value: TSerializable) -> bytes: # This uses a deque to collect output fragments in reverse order, # then joins them together at the end. It's measurably faster # than creating all the intermediate strings. - q = collections.deque() # type: collections.deque + q: collections.deque = collections.deque() _rdumpq(q, 0, value) return b''.join(q) |