feat(cli): hide `--indent-json` from help

This commit is contained in:
D. Bohdan 2023-10-06 09:18:46 +00:00
parent a3852d1460
commit 71d95800ef
2 changed files with 7 additions and 3 deletions

View File

@ -78,8 +78,7 @@ options:
{cbor,json,msgpack,toml,yaml}, -f {cbor,json,msgpack,toml,yaml},
--from {cbor,json,msgpack,toml,yaml}
input format
--json-indent n, --indent-json n
JSON indentation
--json-indent n JSON indentation
-k, --stringify turn into strings boolean, date-time, and null keys
for JSON and TOML and null values for TOML
--max-values n maximum number of values in input data (default

View File

@ -151,13 +151,18 @@ def _parse_command_line(argv: List[str]) -> argparse.Namespace: # noqa: C901.
if not format_from_argv0 or argv0_to == "json":
parser.add_argument(
"--json-indent",
"--indent-json",
dest="json_indent",
metavar="n",
type=int,
default=defaults["json_indent"],
help="JSON indentation",
)
parser.add_argument(
"--indent-json",
dest="json_indent",
type=int,
help=argparse.SUPPRESS,
)
if not format_from_argv0 or argv0_to in {"json", "toml"}:
parser.add_argument(