summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-12-06 00:14:00 -0800
committerSteve Piercy <web@stevepiercy.com>2016-12-13 17:39:00 -0800
commit6293d331046c78e27a0065d39a5277040391dd2d (patch)
treeca4552eaca787c2e54bf31a6eccbe9696b165044
parent74bed06995593b967afb626c6b3754861afb35b8 (diff)
downloadpyramid-6293d331046c78e27a0065d39a5277040391dd2d.tar.gz
pyramid-6293d331046c78e27a0065d39a5277040391dd2d.tar.bz2
pyramid-6293d331046c78e27a0065d39a5277040391dd2d.zip
use ArgumentParser's default usage, specify prog argument
-rw-r--r--pyramid/scripts/pdistreport.py2
-rw-r--r--pyramid/scripts/prequest.py2
-rw-r--r--pyramid/scripts/proutes.py5
-rw-r--r--pyramid/scripts/pshell.py2
-rw-r--r--pyramid/scripts/ptweens.py2
-rw-r--r--pyramid/scripts/pviews.py2
6 files changed, 7 insertions, 8 deletions
diff --git a/pyramid/scripts/pdistreport.py b/pyramid/scripts/pdistreport.py
index e80ea20b6..e5928bde4 100644
--- a/pyramid/scripts/pdistreport.py
+++ b/pyramid/scripts/pdistreport.py
@@ -12,7 +12,7 @@ def out(*args): # pragma: no cover
def get_parser():
parser = argparse.ArgumentParser(
- usage="%(prog)s",
+ prog="pdistreport",
description="Show Python distribution versions and locations in use")
return parser
diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py
index 9e807896d..84e84e1c8 100644
--- a/pyramid/scripts/prequest.py
+++ b/pyramid/scripts/prequest.py
@@ -47,7 +47,7 @@ class PRequestCommand(object):
"""
parser = argparse.ArgumentParser(
- usage="%(prog)s config_uri path_info [args/options]",
+ prog="prequest",
description=textwrap.dedent(description)
)
parser.add_argument(
diff --git a/pyramid/scripts/proutes.py b/pyramid/scripts/proutes.py
index 640cd20a3..e745e19fd 100644
--- a/pyramid/scripts/proutes.py
+++ b/pyramid/scripts/proutes.py
@@ -247,10 +247,9 @@ class PRoutesCommand(object):
"""
bootstrap = (bootstrap,)
stdout = sys.stdout
- usage = '%prog config_uri'
- ConfigParser = configparser.ConfigParser # testing
+ ConfigParser = configparser.ConfigParser # testing
parser = argparse.ArgumentParser(
- usage,
+ prog="proutes",
description=textwrap.dedent(description)
)
parser.add_argument('-g', '--glob',
diff --git a/pyramid/scripts/pshell.py b/pyramid/scripts/pshell.py
index 7e00eeaac..4289f10c4 100644
--- a/pyramid/scripts/pshell.py
+++ b/pyramid/scripts/pshell.py
@@ -45,7 +45,7 @@ class PShellCommand(object):
pkg_resources = pkg_resources # for testing
parser = argparse.ArgumentParser(
- usage="%(prog)s config_uri",
+ prog="pshell",
description=textwrap.dedent(description)
)
parser.add_argument('-p', '--python-shell',
diff --git a/pyramid/scripts/ptweens.py b/pyramid/scripts/ptweens.py
index 3f8c9871e..ed91757ab 100644
--- a/pyramid/scripts/ptweens.py
+++ b/pyramid/scripts/ptweens.py
@@ -28,7 +28,7 @@ class PTweensCommand(object):
"""
parser = argparse.ArgumentParser(
- usage="%(prog)s config_uri",
+ prog="ptweens",
description=textwrap.dedent(description),
)
diff --git a/pyramid/scripts/pviews.py b/pyramid/scripts/pviews.py
index 81150a801..e93d90a53 100644
--- a/pyramid/scripts/pviews.py
+++ b/pyramid/scripts/pviews.py
@@ -28,7 +28,7 @@ class PViewsCommand(object):
stdout = sys.stdout
parser = argparse.ArgumentParser(
- usage="%(prog)s config_uri url",
+ prog="pviews",
description=textwrap.dedent(description)
)