Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
qmk-bot committed Mar 23, 2021
2 parents 6451d54 + 0f76968 commit 485adb3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/python/qmk/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,15 @@ def merge_info_jsons(keyboard, info_data):
continue

# Merge layout data in
if 'layout_aliases' in new_info_data:
info_data['layout_aliases'] = {**info_data.get('layout_aliases', {}), **new_info_data['layout_aliases']}
del new_info_data['layout_aliases']

for layout_name, layout in new_info_data.get('layouts', {}).items():
if layout_name in info_data.get('layout_aliases', {}):
_log_warning(info_data, f"info.json uses alias name {layout_name} instead of {info_data['layout_aliases'][layout_name]}")
layout_name = info_data['layout_aliases'][layout_name]

if layout_name in info_data['layouts']:
for new_key, existing_key in zip(layout['layout'], info_data['layouts'][layout_name]['layout']):
existing_key.update(new_key)
Expand All @@ -559,7 +567,7 @@ def merge_info_jsons(keyboard, info_data):

# Update info_data with the new data
if 'layouts' in new_info_data:
del (new_info_data['layouts'])
del new_info_data['layouts']

deep_update(info_data, new_info_data)

Expand Down

0 comments on commit 485adb3

Please sign in to comment.