diff options
author | QMK Bot <hello@qmk.fm> | 2021-03-09 16:07:25 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-03-09 16:07:25 +0000 |
commit | 7b91af780ace04a08b3de6f266bd65cdc34a78ec (patch) | |
tree | 970a0e2c3039bb745b89c7da9644e0040ba27236 /lib/python | |
parent | 9155b59e1a496b64f7aa576e6e4cb84fd0a9607b (diff) | |
parent | 6d8d20774ff57ea19743d2c9afc209a68c51e361 (diff) | |
download | qmk_firmware-7b91af780ace04a08b3de6f266bd65cdc34a78ec.tar.gz qmk_firmware-7b91af780ace04a08b3de6f266bd65cdc34a78ec.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/info.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 051459698f..96e4399c36 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -74,19 +74,10 @@ def info_json(keyboard): _log_error(info_data, 'No LAYOUTs defined! Need at least one layout defined in the keyboard.h or info.json.') # Make sure we supply layout macros for the community layouts we claim to support - # FIXME(skullydazed): This should be populated into info.json and read from there instead - if 'LAYOUTS' in rules and info_data.get('layouts'): - # Match these up against the supplied layouts - supported_layouts = rules['LAYOUTS'].strip().split() - for layout_name in sorted(info_data['layouts']): - layout_name = layout_name[7:] - - if layout_name in supported_layouts: - supported_layouts.remove(layout_name) - - if supported_layouts: - for supported_layout in supported_layouts: - _log_error(info_data, 'Claims to support community layout %s but no LAYOUT_%s() macro found' % (supported_layout, supported_layout)) + for layout in info_data.get('community_layouts', []): + layout_name = 'LAYOUT_' + layout + if layout_name not in info_data.get('layouts', {}) and layout_name not in info_data.get('layout_aliases', {}): + _log_error(info_data, 'Claims to support community layout %s but no %s() macro found' % (layout, layout_name)) return info_data |