mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
make the new mypy release happy
This commit is contained in:
parent
8ba5f40d76
commit
a6c608e085
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user