]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138019: improve help message for `json.tool` (#138037)
authoryihong <zouzou0208@gmail.com>
Fri, 22 Aug 2025 08:44:25 +0000 (16:44 +0800)
committerGitHub <noreply@github.com>
Fri, 22 Aug 2025 08:44:25 +0000 (08:44 +0000)
Lib/json/tool.py

index 1967817add8abcecdc7f990cf3834af03ec62063..050c2fe2161e3ea9403feb55c95a8aa53152a621 100644 (file)
@@ -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',