Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"--verbose",
dest="verbose",
action="store_true",
help="run in verbose mode.",
default=False,
)
parser.add_argument(
"--version",
dest="version",
action="store_true",
help="show the version and exit.",
default=False,
)
args = vars(parser.parse_args())
if args.get("version"):
print(version.version_string)
return 0
args["ignore"] = merge_sets(args["ignore"])
cfg = extract_config(args)
args["ignore"].update(cfg.pop("ignore", set()))
if "sphinx" in cfg:
args["sphinx"] = cfg.pop("sphinx")
args["extension"].extend(cfg.pop("extension", []))
args["ignore_path"].extend(cfg.pop("ignore_path", []))
cfg.setdefault("ignore_path_errors", {})
tmp_ignores = parse_ignore_path_errors(args.pop("ignore_path_errors", []))
for path, ignores in six.iteritems(tmp_ignores):
if path in cfg["ignore_path_errors"]:
cfg["ignore_path_errors"][path].update(ignores)
else:
cfg["ignore_path_errors"][path] = set(ignores)