aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/language/websockets.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 /pathod/language/websockets.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 'pathod/language/websockets.py')
-rw-r--r--pathod/language/websockets.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pathod/language/websockets.py b/pathod/language/websockets.py
index cc00bcf1..34b4a307 100644
--- a/pathod/language/websockets.py
+++ b/pathod/language/websockets.py
@@ -16,14 +16,14 @@ class WF(base.CaselessLiteral):
class OpCode(base.IntField):
- names = {
+ names: typing.Dict[str, int] = {
"continue": mitmproxy.net.websockets.OPCODE.CONTINUE,
"text": mitmproxy.net.websockets.OPCODE.TEXT,
"binary": mitmproxy.net.websockets.OPCODE.BINARY,
"close": mitmproxy.net.websockets.OPCODE.CLOSE,
"ping": mitmproxy.net.websockets.OPCODE.PING,
"pong": mitmproxy.net.websockets.OPCODE.PONG,
- } # type: typing.Dict[str, int]
+ }
max = 15
preamble = "c"
@@ -97,7 +97,7 @@ COMPONENTS = [
class WebsocketFrame(message.Message):
- components = COMPONENTS # type: typing.List[typing.Type[base._Component]]
+ components: typing.List[typing.Type[base._Component]] = COMPONENTS
logattrs = ["body"]
# Used for nested frames
unique_name = "body"