mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Switch some other options to BooleanOptionalAction
This commit is contained in:
parent
edbd92dbbf
commit
79be6e1dc5
@ -2,7 +2,7 @@ import argparse
|
||||
import configparser
|
||||
from pathlib import Path
|
||||
|
||||
from .parser import CRAWLER_PARSER, SUBPARSERS, load_crawler
|
||||
from .parser import CRAWLER_PARSER, SUBPARSERS, BooleanOptionalAction, load_crawler
|
||||
|
||||
SUBPARSER = SUBPARSERS.add_parser(
|
||||
"kit-ilias-web",
|
||||
@ -27,9 +27,7 @@ GROUP.add_argument(
|
||||
)
|
||||
GROUP.add_argument(
|
||||
"--videos",
|
||||
# TODO Use argparse.BooleanOptionalAction after updating to 3.9
|
||||
action="store_const",
|
||||
const=True,
|
||||
action=BooleanOptionalAction,
|
||||
help="crawl and download videos"
|
||||
)
|
||||
GROUP.add_argument(
|
||||
@ -46,9 +44,7 @@ GROUP.add_argument(
|
||||
)
|
||||
GROUP.add_argument(
|
||||
"--link-file-plaintext",
|
||||
# TODO Use argparse.BooleanOptionalAction after updating to 3.9
|
||||
action="store_const",
|
||||
const=True,
|
||||
action=BooleanOptionalAction,
|
||||
help="use plain text files for external links"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user