mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-14 06:06:02 +08:00
Delete Argument class, simplify GeneratedConfig
This commit is contained in:
@@ -11,8 +11,6 @@ from module.logger import logger
|
||||
CONFIG_IMPORT = '''
|
||||
import datetime
|
||||
|
||||
from module.config.argument import Argument
|
||||
|
||||
# This file was automatically generated by module/config/db.py.
|
||||
# Don't modify it manually.
|
||||
|
||||
@@ -202,10 +200,7 @@ class Database:
|
||||
path = f'{arg["group"]}.{arg["arg"]}'
|
||||
if path in visited_path or '_info' in path:
|
||||
continue
|
||||
data = {'value': parse_value(arg["value"], data=arg), 'path': path}
|
||||
if arg['option']:
|
||||
data['option'] = tuple(list(arg['option'].keys()))
|
||||
lines.append(f' {path_to_arg(path)} = Argument({dict_to_kv(data)})')
|
||||
lines.append(f' {path_to_arg(path)} = {repr(parse_value(arg["value"], data=arg))}')
|
||||
visited_path.add(path)
|
||||
|
||||
with open(filepath_code(), 'w') as f:
|
||||
|
||||
Reference in New Issue
Block a user