gh-138019: improve help message for json.tool (#138037)

This commit is contained in:
yihong 2025-08-22 16:44:25 +08:00 committed by GitHub
parent ce70a57bc0
commit 531fc3a7a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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',