Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
This eliminates false-positives where default values are called out as `local_args` while parsing within the scope of `global_args`.
  • Loading branch information
mos9527 authored Jan 3, 2023
1 parent e673cd3 commit 959341c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bilibili_toolman/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def prase_args(args: list):
global_args_dict[k] = v
if not "--%s" % k in args:
continue
elif k in local_args:
elif k in local_args and local_args[k]["default"] != v:
raise argparse.ArgumentError(None ,'"上传设置" (--%s) 仅应该出现于视频源后 (e.g. --youtube "..." --tags ..) ' % k)
"""pre-parse : fetch global args,then remove them"""
local_args_group = []
Expand Down

0 comments on commit 959341c

Please sign in to comment.