summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-03-23 01:59:02 +0000
committerQMK Bot <hello@qmk.fm>2021-03-23 01:59:02 +0000
commite6d83644e866cb49c4dd08ba78c9cc156c09cf1a (patch)
tree495e14848fbde8c25caff885c631afa70aec9b1c /lib/python/qmk
parentfe58770df8a269e288269459fea09a53cba956d0 (diff)
parente1a7027fe846ccf50629d7d3bb370d3669d193ca (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/info.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 96e4399c36..60d3a0132a 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -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)
@@ -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)