Skip to content

Commit 6925215

Browse files
committed
Require at least one filename with the CLI
1 parent 36d8397 commit 6925215

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ <h2>2. Wrap your function in a CLI</h2>
13361336
parser = argparse.ArgumentParser(prog='your-hook')
13371337
parser.add_argument(
13381338
'filenames',
1339-
nargs='*',
1339+
nargs='+',
13401340
help='Filenames to process.',
13411341
)
13421342

@@ -1376,7 +1376,7 @@ <h3>Simplified example from <code>exif-stripper</code></h3>
13761376
parser = argparse.ArgumentParser(prog='exif-stripper')
13771377
parser.add_argument(
13781378
'filenames',
1379-
nargs='*',
1379+
nargs='+',
13801380
help='Filenames to process.',
13811381
)
13821382

@@ -1446,7 +1446,7 @@ <h2>Example solution</h2>
14461446
)
14471447
parser.add_argument(
14481448
'filenames',
1449-
nargs='*',
1449+
nargs='+',
14501450
help='Filenames to process.',
14511451
)
14521452
parser.add_argument(

0 commit comments

Comments
 (0)