diff options
| author | Steve Piercy <web@stevepiercy.com> | 2016-12-24 12:54:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-24 12:54:55 -0800 |
| commit | 4ccf364c4d3b05af458b70f5306e84cac4919299 (patch) | |
| tree | 8aa87f987bb9810109cef928e29ee71e588bd9db | |
| parent | 8553bd2f06405320d27129e8336d9655ae25e72c (diff) | |
| parent | 0d5820c1c8aa8f0d355a1a875c89bf1c0207bcdf (diff) | |
| download | pyramid-4ccf364c4d3b05af458b70f5306e84cac4919299.tar.gz pyramid-4ccf364c4d3b05af458b70f5306e84cac4919299.tar.bz2 pyramid-4ccf364c4d3b05af458b70f5306e84cac4919299.zip | |
Merge pull request #2886 from stevepiercy/master
improve display of help's description for p* scripts
| -rw-r--r-- | CHANGES.txt | 3 | ||||
| -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 |
8 files changed, 19 insertions, 7 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 994aaec18..218b2e412 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -255,3 +255,6 @@ Documentation Changes See https://github.com/Pylons/pyramid/pull/2881 and https://github.com/Pylons/pyramid/pull/2883. + +- Improve output of p* script descriptions for help. + See https://github.com/Pylons/pyramid/pull/2886
\ No newline at end of file diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py index 75e3b1fdc..a6db520ce 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..66feff624 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..80c8238a2 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..e2d97f5ec 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..83e640c32 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..5ca77e52a 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..4d3312917 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', |
