diff options
-rw-r--r-- | mitmproxy/proxy/protocol/http.py | 5 | ||||
-rw-r--r-- | mitmproxy/proxy/protocol/http2.py | 5 | ||||
-rw-r--r-- | tox.ini | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/mitmproxy/proxy/protocol/http.py b/mitmproxy/proxy/protocol/http.py index ac410eeb..dcedfc5a 100644 --- a/mitmproxy/proxy/protocol/http.py +++ b/mitmproxy/proxy/protocol/http.py @@ -3,6 +3,7 @@ import time import traceback import enum +from mitmproxy import connections # noqa from mitmproxy import exceptions from mitmproxy import http from mitmproxy import flow @@ -146,6 +147,10 @@ def validate_request_form(mode, request): class HttpLayer(base.Layer): + if False: + # mypy type hints + server_conn = None # type: connections.ServerConnection + def __init__(self, ctx, mode): super().__init__(ctx) self.mode = mode diff --git a/mitmproxy/proxy/protocol/http2.py b/mitmproxy/proxy/protocol/http2.py index 5ab503f5..835f86d0 100644 --- a/mitmproxy/proxy/protocol/http2.py +++ b/mitmproxy/proxy/protocol/http2.py @@ -9,6 +9,7 @@ from h2 import connection from h2 import events import queue +from mitmproxy import connections # noqa from mitmproxy import exceptions from mitmproxy import http from mitmproxy.proxy.protocol import base @@ -82,6 +83,10 @@ class SafeH2Connection(connection.H2Connection): class Http2Layer(base.Layer): + if False: + # mypy type hints + client_conn = None # type: connections.ClientConnection + def __init__(self, ctx, mode: str) -> None: super().__init__(ctx) self.mode = mode @@ -27,4 +27,5 @@ commands = mitmproxy/addons \ mitmproxy/addonmanager.py \ mitmproxy/proxy/protocol/ \ + mitmproxy/log.py \ mitmproxy/tools/dump.py mitmproxy/tools/web |