diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-03-17 09:44:09 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2017-03-19 10:32:22 +1300 |
commit | 8130b9880a1f22c477adf5f7bcfd5e1936ae550e (patch) | |
tree | 75b5b275c115b4b3e2290b94fe6aac24b9fdc8ac /mitmproxy/optmanager.py | |
parent | bc67cee6870af7033e5741d8d21d5bd016dfd132 (diff) | |
download | mitmproxy-8130b9880a1f22c477adf5f7bcfd5e1936ae550e.tar.gz mitmproxy-8130b9880a1f22c477adf5f7bcfd5e1936ae550e.tar.bz2 mitmproxy-8130b9880a1f22c477adf5f7bcfd5e1936ae550e.zip |
options cleanups
- Move default client ciphers - no need to have a 10-line string default.
- Add some style guidance on options help
- Be consistent about reflowing options help
Diffstat (limited to 'mitmproxy/optmanager.py')
-rw-r--r-- | mitmproxy/optmanager.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mitmproxy/optmanager.py b/mitmproxy/optmanager.py index 86f833e4..5064ff44 100644 --- a/mitmproxy/optmanager.py +++ b/mitmproxy/optmanager.py @@ -36,7 +36,7 @@ class _Option: self.typespec = typespec self._default = default self.value = unset - self.help = textwrap.dedent(help or "").strip() + self.help = textwrap.dedent(help).strip().replace("\n", " ") self.choices = choices def __repr__(self): @@ -396,9 +396,7 @@ def dump_defaults(opts): raise NotImplementedError txt += " Type %s." % t - txt = "\n".join( - textwrap.wrap(txt) - ) + txt = "\n".join(textwrap.wrap(txt)) s.yaml_set_comment_before_after_key(k, before = "\n" + txt) return ruamel.yaml.round_trip_dump(s) |