diff options
| author | Steve Piercy <web@stevepiercy.com> | 2016-12-24 12:41:49 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2016-12-24 12:41:49 -0800 |
| commit | df57ecafed8e3cf56a74e5f95b578f5dae400f55 (patch) | |
| tree | b708acb7e824a4e95494cdf74336c4a115ad4398 | |
| parent | 6e037c6d7806ea895dc03bf56c9567474b33f4de (diff) | |
| download | pyramid-df57ecafed8e3cf56a74e5f95b578f5dae400f55.tar.gz pyramid-df57ecafed8e3cf56a74e5f95b578f5dae400f55.tar.bz2 pyramid-df57ecafed8e3cf56a74e5f95b578f5dae400f55.zip | |
improve display of help's description for p* scripts
- Without ``formatter_class = argparse.RawDescriptionHelpFormatter``, whitespace is removed from the description, rendering it as a blob of text and less readable
| -rw-r--r-- | pyramid/scripts/pcreate.py | 7 | ||||
| -rw-r--r-- | pyramid/scripts/prequest.py | 3 | ||||
| -rw-r--r-- | pyramid/scripts/proutes.py | 3 | ||||
| -rw-r--r-- | pyramid/scripts/pserve.py | 3 | ||||
| -rw-r--r-- | pyramid/scripts/pshell.py | 3 | ||||
| -rw-r--r-- | pyramid/scripts/ptweens.py | 1 | ||||
| -rw-r--r-- | pyramid/scripts/pviews.py | 3 |
7 files changed, 16 insertions, 7 deletions
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py index 75e3b1fdc..cfab88160 100644 --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -23,13 +23,16 @@ def main(argv=sys.argv, quiet=False): class PCreateCommand(object): verbosity = 1 # required - parser = argparse.ArgumentParser(description="""\ + parser = argparse.ArgumentParser( + description="""\ Render Pyramid scaffolding to an output directory. Note: As of Pyramid 1.8, this command is deprecated. Use a specific cookiecutter instead: https://github.com/Pylons/?q=cookiecutter -""") +""", + formatter_class = argparse.RawDescriptionHelpFormatter, + ) parser.add_argument('-s', '--scaffold', dest='scaffold_name', action='append', diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py index aefb4e18d..b74948289 100644 --- a/pyramid/scripts/prequest.py +++ b/pyramid/scripts/prequest.py @@ -47,7 +47,8 @@ class PRequestCommand(object): """ parser = argparse.ArgumentParser( - description=textwrap.dedent(description) + description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument( '-n', '--app-name', diff --git a/pyramid/scripts/proutes.py b/pyramid/scripts/proutes.py index 2a999e04f..cd731946d 100644 --- a/pyramid/scripts/proutes.py +++ b/pyramid/scripts/proutes.py @@ -249,7 +249,8 @@ class PRoutesCommand(object): stdout = sys.stdout ConfigParser = configparser.ConfigParser # testing parser = argparse.ArgumentParser( - description=textwrap.dedent(description) + description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument('-g', '--glob', action='store', diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index 845933c27..1f66394da 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -51,7 +51,8 @@ class PServeCommand(object): default_verbosity = 1 parser = argparse.ArgumentParser( - description=textwrap.dedent(description) + description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument( '-n', '--app-name', diff --git a/pyramid/scripts/pshell.py b/pyramid/scripts/pshell.py index d8abf6619..d4b2db0ff 100644 --- a/pyramid/scripts/pshell.py +++ b/pyramid/scripts/pshell.py @@ -45,7 +45,8 @@ class PShellCommand(object): pkg_resources = pkg_resources # for testing parser = argparse.ArgumentParser( - description=textwrap.dedent(description) + description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument('-p', '--python-shell', action='store', diff --git a/pyramid/scripts/ptweens.py b/pyramid/scripts/ptweens.py index f278a0370..076d44fa5 100644 --- a/pyramid/scripts/ptweens.py +++ b/pyramid/scripts/ptweens.py @@ -29,6 +29,7 @@ class PTweensCommand(object): """ parser = argparse.ArgumentParser( description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument('config_uri', diff --git a/pyramid/scripts/pviews.py b/pyramid/scripts/pviews.py index 64408bdad..0d4c8e201 100644 --- a/pyramid/scripts/pviews.py +++ b/pyramid/scripts/pviews.py @@ -28,7 +28,8 @@ class PViewsCommand(object): stdout = sys.stdout parser = argparse.ArgumentParser( - description=textwrap.dedent(description) + description=textwrap.dedent(description), + formatter_class = argparse.RawDescriptionHelpFormatter, ) parser.add_argument('config_uri', |
