From d7a080cb6864c9272c156c6355ba3f190c176389 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Jan 23 2023 10:23:13 +0000 Subject: [PATCH 1/2] cli: improve help for call --python option The --python option is for input values, not output values. Update the --help message to explain this. --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index c4cf995..754b2ae 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -965,7 +965,7 @@ def handle_call(goptions, session, args): Note, that you can use global option --noauth for anonymous calls here""" usage = textwrap.dedent(usage) parser = OptionParser(usage=get_usage_str(usage)) - parser.add_option("--python", action="store_true", help="Use python syntax for values") + parser.add_option("--python", action="store_true", help="Use python syntax for RPC parameter values") parser.add_option("--kwargs", help="Specify keyword arguments as a dictionary (implies --python)") parser.add_option("--json-output", action="store_true", help="Use JSON syntax for output") From 5c1718337c0afbaa2c2dc4725be4d85259cfc396 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jan 23 2023 10:46:15 +0000 Subject: [PATCH 2/2] fix tests --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 754b2ae..c45f655 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -965,7 +965,8 @@ def handle_call(goptions, session, args): Note, that you can use global option --noauth for anonymous calls here""" usage = textwrap.dedent(usage) parser = OptionParser(usage=get_usage_str(usage)) - parser.add_option("--python", action="store_true", help="Use python syntax for RPC parameter values") + parser.add_option("--python", action="store_true", + help="Use python syntax for RPC parameter values") parser.add_option("--kwargs", help="Specify keyword arguments as a dictionary (implies --python)") parser.add_option("--json-output", action="store_true", help="Use JSON syntax for output") diff --git a/tests/test_cli/test_call.py b/tests/test_cli/test_call.py index fb70d78..52c2ea4 100644 --- a/tests/test_cli/test_call.py +++ b/tests/test_cli/test_call.py @@ -120,7 +120,7 @@ Note, that you can use global option --noauth for anonymous calls here Options: -h, --help show this help message and exit - --python Use python syntax for values + --python Use python syntax for RPC parameter values --kwargs=KWARGS Specify keyword arguments as a dictionary (implies --python) --json-output Use JSON syntax for output