mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Pref: Reduce deep_get in config_update
since deep_iter yields the value already
This commit is contained in:
@@ -616,8 +616,7 @@ class ConfigUpdater:
|
||||
"""
|
||||
new = {}
|
||||
|
||||
def deep_load(keys):
|
||||
data = deep_get(self.args, keys=keys, default={})
|
||||
for keys, data in deep_iter(self.args, depth=3):
|
||||
value = deep_get(old, keys=keys, default=data['value'])
|
||||
typ = data['type']
|
||||
display = data.get('display')
|
||||
@@ -627,9 +626,6 @@ class ConfigUpdater:
|
||||
value = parse_value(value, data=data)
|
||||
deep_set(new, keys=keys, value=value)
|
||||
|
||||
for path, _ in deep_iter(self.args, depth=3):
|
||||
deep_load(path)
|
||||
|
||||
# AzurStatsID
|
||||
if is_template:
|
||||
deep_set(new, 'Alas.DropRecord.AzurStatsID', None)
|
||||
|
||||
Reference in New Issue
Block a user