make the new mypy release happy

This commit is contained in:
Maximilian Hils 2016-11-23 01:27:23 +01:00
parent 8ba5f40d76
commit a6c608e085
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -27,4 +27,5 @@ commands =
mitmproxy/addons \
mitmproxy/addonmanager.py \
mitmproxy/proxy/protocol/ \
mitmproxy/log.py \
mitmproxy/tools/dump.py mitmproxy/tools/web