mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
protobuf: changed return type annotation in loads to enhance granularity
This commit is contained in:
parent
ccb5fd7c99
commit
afe41eb75c
@ -189,7 +189,7 @@ def load_http(hf: http_pb2.HTTPFlow) -> HTTPFlow:
|
|||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
def loads(b: bytes, typ="http") -> flow.Flow:
|
def loads(b: bytes, typ="http") -> typing.Union[HTTPFlow]:
|
||||||
if typ != 'http':
|
if typ != 'http':
|
||||||
raise exceptions.TypeError("Flow types different than HTTP not supported yet!")
|
raise exceptions.TypeError("Flow types different than HTTP not supported yet!")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user