mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Shift option help styling admonition into the appropriate Loader docstring
This commit is contained in:
parent
b57f551c0d
commit
77e5d823e0
@ -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 = (
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user