aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/websocket.py
diff options
context:
space:
mode:
authoroscure76 <midhun.nitw@gmail.com>2018-04-14 16:24:41 -0700
committeroscure76 <midhun.nitw@gmail.com>2018-04-14 16:24:41 -0700
commit0e984e1442e735a6a3cee5170bead492b231d620 (patch)
tree4e0ae4b5598f3c1be35a38819b15a12ace6209c8 /mitmproxy/websocket.py
parent5eb17bbf6d47c8d703763bfa41cf1ff3f98a632f (diff)
downloadmitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.tar.gz
mitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.tar.bz2
mitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.zip
fix Python 3.6 variable type annotations #3053
Diffstat (limited to 'mitmproxy/websocket.py')
-rw-r--r--mitmproxy/websocket.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/websocket.py b/mitmproxy/websocket.py
index 253503f4..9de2e26e 100644
--- a/mitmproxy/websocket.py
+++ b/mitmproxy/websocket.py
@@ -24,7 +24,7 @@ class WebSocketMessage(serializable.Serializable):
"""True if this messages was sent by the client."""
self.content = content
"""A byte-string representing the content of this message."""
- self.timestamp = timestamp or int(time.time()) # type: int
+ self.timestamp: int = timestamp or int(time.time())
"""Timestamp of when this message was received or created."""
self.killed = killed
"""True if this messages was killed and should not be sent to the other endpoint."""
@@ -63,7 +63,7 @@ class WebSocketFlow(flow.Flow):
def __init__(self, client_conn, server_conn, handshake_flow, live=None):
super().__init__("websocket", client_conn, server_conn, live)
- self.messages = [] # type: List[WebSocketMessage]
+ self.messages: List[WebSocketMessage] = []
"""A list containing all WebSocketMessage's."""
self.close_sender = 'client'
"""'client' if the client initiated connection closing."""