diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
commit | ec92fca8c030fe5971a034a658033f70965b990a (patch) | |
tree | ef9a2049eeab539d13e1f9662fd51220ab4ee817 /libmproxy/console/help.py | |
parent | 0f8e8ee1ad667c8d747d5876f9b630ecbc01d7e9 (diff) | |
parent | a05a70d8168a07c92b2a3ecbbb1958d85532efe3 (diff) | |
download | mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.gz mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.bz2 mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.zip |
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'libmproxy/console/help.py')
-rw-r--r-- | libmproxy/console/help.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py index cbd5bef8..4e81a566 100644 --- a/libmproxy/console/help.py +++ b/libmproxy/console/help.py @@ -6,7 +6,7 @@ from . import common, signals from .. import filt, version footer = [ - ("heading", 'mitmproxy v%s '%version.VERSION), + ("heading", 'mitmproxy v%s ' % version.VERSION), ('heading_key', "q"), ":back ", ] @@ -33,7 +33,12 @@ class HelpView(urwid.ListBox): ("pg up/down", "page up/down"), ("arrows", "up, down, left, right"), ] - text.extend(common.format_keyvals(keys, key="key", val="text", indent=4)) + text.extend( + common.format_keyvals( + keys, + key="key", + val="text", + indent=4)) text.append(urwid.Text([("head", "\n\nGlobal keys:\n")])) keys = [ @@ -52,15 +57,15 @@ class HelpView(urwid.ListBox): f = [] for i in filt.filt_unary: f.append( - ("~%s"%i.code, i.help) + ("~%s" % i.code, i.help) ) for i in filt.filt_rex: f.append( - ("~%s regex"%i.code, i.help) + ("~%s regex" % i.code, i.help) ) for i in filt.filt_int: f.append( - ("~%s int"%i.code, i.help) + ("~%s int" % i.code, i.help) ) f.sort() f.extend( @@ -75,7 +80,7 @@ class HelpView(urwid.ListBox): text.append( urwid.Text( - [ + [ "\n", ("text", " Regexes are Python-style.\n"), ("text", " Regexes can be specified as quoted strings.\n"), @@ -83,13 +88,13 @@ class HelpView(urwid.ListBox): ("text", " Expressions with no operators are regex matches against URL.\n"), ("text", " Default binary operator is &.\n"), ("head", "\n Examples:\n"), - ] + ] ) ) examples = [ - ("google\.com", "Url containing \"google.com"), - ("~q ~b test", "Requests where body contains \"test\""), - ("!(~q & ~t \"text/html\")", "Anything but requests with a text/html content type."), + ("google\.com", "Url containing \"google.com"), + ("~q ~b test", "Requests where body contains \"test\""), + ("!(~q & ~t \"text/html\")", "Anything but requests with a text/html content type."), ] text.extend( common.format_keyvals(examples, key="key", val="text", indent=4) |