diff options
| author | Aldo Cortesi <aldo@corte.si> | 2018-02-26 08:10:45 +1300 | 
|---|---|---|
| committer | Aldo Cortesi <aldo@corte.si> | 2018-02-26 09:02:24 +1300 | 
| commit | 77e5d823e0e7cb2032e639de315d49bcad1945cc (patch) | |
| tree | 0ba411280c2a93c2c700063918c55a13e7ea4540 | |
| parent | b57f551c0d496f7e604cd1b3bf5f9bb2cf44f1bb (diff) | |
| download | mitmproxy-77e5d823e0e7cb2032e639de315d49bcad1945cc.tar.gz mitmproxy-77e5d823e0e7cb2032e639de315d49bcad1945cc.tar.bz2 mitmproxy-77e5d823e0e7cb2032e639de315d49bcad1945cc.zip | |
Shift option help styling admonition into the appropriate Loader docstring
| -rw-r--r-- | mitmproxy/addonmanager.py | 7 | ||||
| -rw-r--r-- | mitmproxy/options.py | 8 | 
2 files changed, 8 insertions, 7 deletions
| diff --git a/mitmproxy/addonmanager.py b/mitmproxy/addonmanager.py index 37c501ee..bfaacf6d 100644 --- a/mitmproxy/addonmanager.py +++ b/mitmproxy/addonmanager.py @@ -92,6 +92,13 @@ class Loader:          help: str,          choices: typing.Optional[typing.Sequence[str]] = None      ) -> None: +        """ +            Add an option to mitmproxy. + +            Help should be a single paragraph with no linebreaks - it will be +            reflowed by tools. Information on the data type should be omitted - +            it will be generated and added by tools as needed. +        """          if name in self.master.options:              existing = self.master.options._options[name]              same_signature = ( diff --git a/mitmproxy/options.py b/mitmproxy/options.py index 7a00bb87..e9e8a563 100644 --- a/mitmproxy/options.py +++ b/mitmproxy/options.py @@ -14,12 +14,6 @@ log_verbosity = [  CA_DIR = "~/.mitmproxy"  LISTEN_PORT = 8080 -# Some help text style guidelines: -# -# - Should be a single paragraph with no linebreaks. Help will be reflowed by -# tools. -# - Avoid adding information about the data type - we can generate that. -  class Options(optmanager.OptManager): @@ -42,6 +36,7 @@ class Options(optmanager.OptManager):          mode = None  # type: str          rawtcp = None  # type: bool          server = None  # type: bool +        showhost = None  # type: bool          spoof_source_address = None  # type: bool          ssl_insecure = None  # type: bool          ssl_verify_upstream_trusted_ca = None  # type: Optional[str] @@ -56,7 +51,6 @@ class Options(optmanager.OptManager):          # FIXME: Options that must be migrated to addons, but are complicated          # because they're used by more than one addon, or because they're          # embedded in the core code somehow. -        showhost = None  # type: bool          verbosity = None  # type: str          view_filter = None  # type: Optional[str] | 
