First pass of ruff check fixes (#26257)

This commit is contained in:
Joel Challis
2026-07-18 04:06:19 +01:00
committed by GitHub
parent bea6a83a12
commit cf01e22447
18 changed files with 56 additions and 75 deletions
+6 -3
View File
@@ -256,10 +256,13 @@ class Layout:
def _gen_chordal_hold_layout(info_data):
"""Convert info.json content to chordal_hold_layout
"""
layouts = info_data.get('layouts', {})
if not layouts:
return []
# NOTE: If there are multiple layouts, only the first is read.
for layout_name, layout_json in info_data['layouts'].items():
layout = Layout(layout_json)
break
layout_name, layout_json = next(iter(layouts.items()))
layout = Layout(layout_json)
if layout.is_symmetric():
# If the layout is symmetric (e.g. most split keyboards), guess the