Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve display of help's description for p* scripts #2886

Merged
merged 5 commits into from
Dec 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions pyramid/scripts/pcreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion pyramid/scripts/prequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion pyramid/scripts/proutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion pyramid/scripts/pserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion pyramid/scripts/pshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions pyramid/scripts/ptweens.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class PTweensCommand(object):
"""
parser = argparse.ArgumentParser(
description=textwrap.dedent(description),
formatter_class=argparse.RawDescriptionHelpFormatter,
)

parser.add_argument('config_uri',
Expand Down
3 changes: 2 additions & 1 deletion pyramid/scripts/pviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down