This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c7215a28f9 Correct `json` arg help in `airflow variables set` command
(#25726)
c7215a28f9 is described below
commit c7215a28f9df71c63408f758ed34253a4dfaa318
Author: Josh Fell <[email protected]>
AuthorDate: Mon Aug 15 12:55:59 2022 -0400
Correct `json` arg help in `airflow variables set` command (#25726)
---
airflow/cli/cli_parser.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/airflow/cli/cli_parser.py b/airflow/cli/cli_parser.py
index 4828a37bfc..f777fd9151 100644
--- a/airflow/cli/cli_parser.py
+++ b/airflow/cli/cli_parser.py
@@ -474,7 +474,8 @@ ARG_VAR_VALUE = Arg(("value",), metavar='VALUE',
help="Variable value")
ARG_DEFAULT = Arg(
("-d", "--default"), metavar="VAL", default=None, help="Default value
returned if variable does not exist"
)
-ARG_JSON = Arg(("-j", "--json"), help="Deserialize JSON variable",
action="store_true")
+ARG_DESERIALIZE_JSON = Arg(("-j", "--json"), help="Deserialize JSON variable",
action="store_true")
+ARG_SERIALIZE_JSON = Arg(("-j", "--json"), help="Serialize JSON variable",
action="store_true")
ARG_VAR_IMPORT = Arg(("file",), help="Import variables from JSON file")
ARG_VAR_EXPORT = Arg(("file",), help="Export all variables to JSON file")
@@ -1353,13 +1354,13 @@ VARIABLES_COMMANDS = (
name='get',
help='Get variable',
func=lazy_load_command('airflow.cli.commands.variable_command.variables_get'),
- args=(ARG_VAR, ARG_JSON, ARG_DEFAULT, ARG_VERBOSE),
+ args=(ARG_VAR, ARG_DESERIALIZE_JSON, ARG_DEFAULT, ARG_VERBOSE),
),
ActionCommand(
name='set',
help='Set variable',
func=lazy_load_command('airflow.cli.commands.variable_command.variables_set'),
- args=(ARG_VAR, ARG_VAR_VALUE, ARG_JSON),
+ args=(ARG_VAR, ARG_VAR_VALUE, ARG_SERIALIZE_JSON),
),
ActionCommand(
name='delete',