1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

use ArgumentParser's own "usage" line in help output

This commit is contained in:
Hans-Christoph Steiner 2020-10-01 12:17:02 +02:00
parent b23cf9f8ad
commit fede58a710
10 changed files with 10 additions and 14 deletions

View File

@ -148,7 +148,7 @@ For more info on this idea:
def main():
global options
parser = ArgumentParser(usage="%(prog)s [options]")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("--git-repo",
default=os.path.join(os.getcwd(), 'binary_transparency'),

View File

@ -597,7 +597,7 @@ def main():
global config, options
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("appid", nargs='*', help=_("application ID of file to operate on"))
parser.add_argument("--auto", action="store_true", default=False,

View File

@ -47,7 +47,7 @@ def main():
global config, options
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options]")
parser = ArgumentParser()
common.setup_global_opts(parser)
options = parser.parse_args()

View File

@ -568,7 +568,7 @@ def main():
global config, options
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("-f", "--format", action="store_true", default=False,
help=_("Also warn about formatting issues, like rewritemeta -l"))

View File

@ -41,7 +41,7 @@ def _run_wget(path, urls):
def main():
global options
parser = ArgumentParser(usage=_("%(prog)s [options] url"))
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("url", nargs='?',
help=_('Base URL to mirror, can include the index signing key '

View File

@ -88,7 +88,7 @@ def _ssh_key_from_debug_keystore(keystore=KEYSTORE_FILE):
def main():
parser = ArgumentParser(usage="%(prog)s")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("--keystore", default=KEYSTORE_FILE,
help=_("Specify which debug keystore file to use."))

View File

@ -25,7 +25,7 @@ options = None
def main():
parser = ArgumentParser(usage="%(prog)s")
parser = ArgumentParser()
common.setup_global_opts(parser)
metadata.add_metadata_arguments(parser)
options = parser.parse_args()

View File

@ -49,8 +49,7 @@ def main():
global config, options
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("-l", "--list", action="store_true", default=False,
help=_("List files that would be reformatted"))

View File

@ -87,9 +87,7 @@ def extract(options):
def main():
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options] APK [APK...]")
parser = ArgumentParser()
common.setup_global_opts(parser)
parser.add_argument("APK", nargs='*',
help=_("signed APK, either a file-path or HTTPS URL."))

View File

@ -91,8 +91,7 @@ def main():
global config, options
# Parse command line...
parser = ArgumentParser(usage="%(prog)s [options]")
parser = ArgumentParser()
common.setup_global_opts(parser)
options = parser.parse_args()