mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-03-26 08:54:48 +08:00
lint!
This commit is contained in:
committed by
Thomas Kriechbaumer
parent
e8067a2474
commit
5ce370e2a9
@@ -482,9 +482,9 @@ def _make():
|
||||
])
|
||||
expr = pp.OneOrMore(expr)
|
||||
return expr.setParseAction(lambda x: FAnd(x) if len(x) != 1 else x)
|
||||
|
||||
|
||||
bnf = _make()
|
||||
|
||||
|
||||
TFilter = Callable[[flow.Flow], bool]
|
||||
|
||||
|
||||
|
||||
@@ -251,6 +251,7 @@ def make_connect_response(http_version):
|
||||
b"",
|
||||
)
|
||||
|
||||
|
||||
expect_continue_response = HTTPResponse(
|
||||
b"HTTP/1.1", 100, b"Continue", http.Headers(), b""
|
||||
)
|
||||
|
||||
@@ -42,6 +42,7 @@ class CookieAttrs(multidict.MultiDict):
|
||||
# if we take the last part.
|
||||
return values[-1]
|
||||
|
||||
|
||||
SetCookie = collections.namedtuple("SetCookie", ["value", "attrs"])
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ class SocksError(Exception):
|
||||
super().__init__(message)
|
||||
self.code = code
|
||||
|
||||
|
||||
VERSION = bidi.BiDi(
|
||||
SOCKS4=0x04,
|
||||
SOCKS5=0x05
|
||||
|
||||
@@ -106,6 +106,7 @@ class SSLKeyLogger:
|
||||
return SSLKeyLogger(filename)
|
||||
return False
|
||||
|
||||
|
||||
log_ssl_key = SSLKeyLogger.create_logfun(
|
||||
os.getenv("MITMPROXY_SSLKEYLOGFILE") or os.getenv("SSLKEYLOGFILE"))
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ def fcol(s, attr):
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if urwid.util.detected_encoding:
|
||||
SYMBOL_REPLAY = u"\u21ba"
|
||||
SYMBOL_RETURN = u"\u2190"
|
||||
|
||||
@@ -41,6 +41,8 @@ def _mkhelp():
|
||||
]
|
||||
text.extend(common.format_keyvals(keys, key="key", val="text", indent=4))
|
||||
return text
|
||||
|
||||
|
||||
help_context = _mkhelp()
|
||||
|
||||
footer = [
|
||||
|
||||
@@ -90,6 +90,8 @@ def _mkhelp():
|
||||
]
|
||||
text.extend(common.format_keyvals(keys, key="key", val="text", indent=4))
|
||||
return text
|
||||
|
||||
|
||||
help_context = _mkhelp()
|
||||
|
||||
footer = [
|
||||
@@ -120,6 +122,7 @@ class FlowViewHeader(urwid.WidgetWrap):
|
||||
hostheader=self.master.options.showhost
|
||||
)
|
||||
|
||||
|
||||
TAB_REQ = 0
|
||||
TAB_RESP = 1
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ def _mkhelp():
|
||||
]
|
||||
text.extend(common.format_keyvals(keys, key="key", val="text", indent=4))
|
||||
return text
|
||||
|
||||
|
||||
help_context = _mkhelp()
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ def _mkhelp():
|
||||
]
|
||||
text.extend(common.format_keyvals(keys, key="key", val="text", indent=4))
|
||||
return text
|
||||
|
||||
|
||||
help_context = _mkhelp()
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ def add_log(e, level):
|
||||
level=level
|
||||
)
|
||||
|
||||
|
||||
# Show a status message in the action bar
|
||||
status_message = blinker.Signal()
|
||||
|
||||
|
||||
@@ -51,5 +51,6 @@ def main(profiler, clock_type, concurrency):
|
||||
stats.save(outfile, type='callgrind')
|
||||
print("Done.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -19,5 +19,6 @@ class service(socketserver.BaseRequestHandler):
|
||||
class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
||||
pass
|
||||
|
||||
|
||||
server = ThreadedTCPServer(('', 1520), service)
|
||||
server.serve_forever()
|
||||
|
||||
Reference in New Issue
Block a user