diff options
author | madt1m <pietrotirenna.pt@gmail.com> | 2018-08-01 12:00:07 +0200 |
---|---|---|
committer | madt1m <pietrotirenna.pt@gmail.com> | 2018-08-01 12:00:07 +0200 |
commit | afe41eb75cb7ec5d5edf54fe490bdde49294683b (patch) | |
tree | 507c847b3076f4132387034d223d6cdac315a0e9 | |
parent | ccb5fd7c9981b65e8bb543076e89e381481340f7 (diff) | |
download | mitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.tar.gz mitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.tar.bz2 mitmproxy-afe41eb75cb7ec5d5edf54fe490bdde49294683b.zip |
protobuf: changed return type annotation in loads to enhance granularity
-rw-r--r-- | mitmproxy/io/protobuf.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/io/protobuf.py b/mitmproxy/io/protobuf.py index 9a00eacf..c8ca3acc 100644 --- a/mitmproxy/io/protobuf.py +++ b/mitmproxy/io/protobuf.py @@ -189,7 +189,7 @@ def load_http(hf: http_pb2.HTTPFlow) -> HTTPFlow: return f -def loads(b: bytes, typ="http") -> flow.Flow: +def loads(b: bytes, typ="http") -> typing.Union[HTTPFlow]: if typ != 'http': raise exceptions.TypeError("Flow types different than HTTP not supported yet!") else: |