summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/json_encoders.py
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-05-15 22:39:29 +0100
committerGitHub <noreply@github.com>2022-05-16 07:39:29 +1000
commit608fa5154c01420ff8f0946655ef16c99dec56a4 (patch)
tree7c4c1f34b5a9015560825e7fc1b25d9376f385c1 /lib/python/qmk/json_encoders.py
parentb7771ec25b96f2b88a7fa4201081e10ca6fbb9d4 (diff)
Data driven `g_led_config` (#16728)
Diffstat (limited to 'lib/python/qmk/json_encoders.py')
-rwxr-xr-xlib/python/qmk/json_encoders.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/json_encoders.py b/lib/python/qmk/json_encoders.py
index 40a5c1dea8..f968b3dbb2 100755
--- a/lib/python/qmk/json_encoders.py
+++ b/lib/python/qmk/json_encoders.py
@@ -75,8 +75,8 @@ class InfoJSONEncoder(QMKJSONEncoder):
"""Encode info.json dictionaries.
"""
if obj:
- if self.indentation_level == 4:
- # These are part of a layout, put them on a single line.
+ if set(("x", "y")).issubset(obj.keys()):
+ # These are part of a layout/led_config, put them on a single line.
return "{ " + ", ".join(f"{self.encode(key)}: {self.encode(element)}" for key, element in sorted(obj.items())) + " }"
else: