From 531fc3a7a3998d714a9382f0bc143c05d69e9174 Mon Sep 17 00:00:00 2001 From: yihong Date: Fri, 22 Aug 2025 16:44:25 +0800 Subject: [PATCH] gh-138019: improve help message for `json.tool` (#138037) --- Lib/json/tool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/json/tool.py b/Lib/json/tool.py index 1967817add8a..050c2fe2161e 100644 --- a/Lib/json/tool.py +++ b/Lib/json/tool.py @@ -46,7 +46,8 @@ def main(): 'to validate and pretty-print JSON objects.') parser = argparse.ArgumentParser(description=description, color=True) parser.add_argument('infile', nargs='?', - help='a JSON file to be validated or pretty-printed', + help='a JSON file to be validated or pretty-printed; ' + 'defaults to stdin', default='-') parser.add_argument('outfile', nargs='?', help='write the output of infile to outfile', -- 2.47.3