提交 14414894 编写于 作者: K Kentaro Wada

Stop overwriting provided config with default args

上级 0b4e2bfd
...@@ -1242,6 +1242,17 @@ def main(): ...@@ -1242,6 +1242,17 @@ def main():
filename = config_from_args.pop('filename') filename = config_from_args.pop('filename')
output = config_from_args.pop('output') output = config_from_args.pop('output')
config_file = config_from_args.pop('config_file') config_file = config_from_args.pop('config_file')
# drop the default config
if not config_from_args['auto_save']:
config_from_args.pop('auto_save')
if config_from_args['store_data']:
config_from_args.pop('store_data')
if not config_from_args['labels']:
config_from_args.pop('labels')
if not config_from_args['sort_labels']:
config_from_args.pop('sort_labels')
if not config_from_args['validate_label']:
config_from_args.pop('validate_label')
config = get_config(config_from_args, config_file) config = get_config(config_from_args, config_file)
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册