Skip to content

Commit a2c0d53

Browse files
committed
Follow argparse docs and use 'args'
1 parent 9ad283c commit a2c0d53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/mimetypes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -686,18 +686,18 @@ def _main():
686686
help='additionally search for common but non-standard types'
687687
)
688688
parser.add_argument('type', nargs='+', help='a type to search')
689-
arguments = parser.parse_args()
689+
args = parser.parse_args()
690690

691-
if arguments.extension:
692-
for gtype in arguments.type:
693-
guess = guess_extension(gtype, not arguments.lenient)
691+
if args.extension:
692+
for gtype in args.type:
693+
guess = guess_extension(gtype, not args.lenient)
694694
if guess:
695695
print(guess)
696696
else:
697697
sys.exit(f"error: unknown type {gtype}")
698698
else:
699-
for gtype in arguments.type:
700-
guess, encoding = guess_type(gtype, not arguments.lenient)
699+
for gtype in args.type:
700+
guess, encoding = guess_type(gtype, not args.lenient)
701701
if guess:
702702
print('type:', guess, 'encoding:', encoding)
703703
else:

0 commit comments

Comments
 (0)