diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 01:27:23 +0100 |
|---|---|---|
| committer | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 01:27:23 +0100 |
| commit | a6c608e08595e95279713e51e2a346344bd290c0 (patch) | |
| tree | bc63598033c6ca4ac7f257897aec0b23eaff60d1 | |
| parent | 8ba5f40d76e371248f1d035b083982d6c10d2538 (diff) | |
| download | mitmproxy-a6c608e08595e95279713e51e2a346344bd290c0.tar.gz mitmproxy-a6c608e08595e95279713e51e2a346344bd290c0.tar.bz2 mitmproxy-a6c608e08595e95279713e51e2a346344bd290c0.zip | |
make the new mypy release happy
| -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 |
