1
0
Fork 0

Promote label with newlines to lint error (#17347)

This commit is contained in:
Joel Challis 2022-06-10 11:44:23 +01:00 committed by GitHub
parent d8ace624c8
commit 7baf9b3f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 25 deletions

View file

@ -26,13 +26,6 @@ def _valid_community_layout(layout):
return (Path('layouts/default') / layout).exists()
def _remove_newlines_from_labels(layouts):
for layout_name, layout_json in layouts.items():
for key in layout_json['layout']:
if '\n' in key['label']:
key['label'] = key['label'].split('\n')[0]
def info_json(keyboard):
"""Generate the info.json data for a specific keyboard.
"""
@ -111,9 +104,6 @@ def info_json(keyboard):
# Check that the reported matrix size is consistent with the actual matrix size
_check_matrix(info_data)
# Remove newline characters from layout labels
_remove_newlines_from_labels(layouts)
return info_data