1
0
Fork 0

Promote 'layouts require matrix data' to api error (#17349)

This commit is contained in:
Joel Challis 2022-06-10 11:44:48 +01:00 committed by GitHub
parent 7baf9b3f35
commit 92665aef33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View file

@ -797,8 +797,11 @@ def merge_info_jsons(keyboard, info_data):
for new_key, existing_key in zip(layout['layout'], info_data['layouts'][layout_name]['layout']):
existing_key.update(new_key)
else:
layout['c_macro'] = False
info_data['layouts'][layout_name] = layout
if not all('matrix' in key_data.keys() for key_data in layout['layout']):
_log_error(info_data, f'Layout "{layout_name}" has no "matrix" definition in either "info.json" or "<keyboard>.h"!')
else:
layout['c_macro'] = False
info_data['layouts'][layout_name] = layout
# Update info_data with the new data
if 'layouts' in new_info_data: