fix: argparse CLI option ordering, fixes #268
This commit is contained in:
parent
f58a864951
commit
01fea457ed
1 changed files with 2 additions and 1 deletions
|
|
@ -51,12 +51,13 @@ def main():
|
||||||
help="show the version number and exit",
|
help="show the version number and exit",
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument("filename", nargs="?")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-o",
|
"-o",
|
||||||
"--output",
|
"--output",
|
||||||
help="Output file name. If not provided, output is written to stdout.",
|
help="Output file name. If not provided, output is written to stdout.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument("filename", nargs="?")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.filename is None:
|
if args.filename is None:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue