aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/generate/config_h.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli/generate/config_h.py')
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index 15d4fbf2d..1de84de7a 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -64,7 +64,7 @@ def direct_pins(direct_pins):
64 rows = [] 64 rows = []
65 65
66 for row in direct_pins: 66 for row in direct_pins:
67 cols = ','.join([col or 'NO_PIN' for col in row]) 67 cols = ','.join(map(str, [col or 'NO_PIN' for col in row]))
68 rows.append('{' + cols + '}') 68 rows.append('{' + cols + '}')
69 69
70 col_count = len(direct_pins[0]) 70 col_count = len(direct_pins[0])
@@ -88,7 +88,7 @@ def direct_pins(direct_pins):
88def col_pins(col_pins): 88def col_pins(col_pins):
89 """Return the config.h lines that set the column pins. 89 """Return the config.h lines that set the column pins.
90 """ 90 """
91 cols = ','.join(col_pins) 91 cols = ','.join(map(str, [pin or 'NO_PIN' for pin in col_pins]))
92 col_num = len(col_pins) 92 col_num = len(col_pins)
93 93
94 return """ 94 return """
@@ -105,7 +105,7 @@ def col_pins(col_pins):
105def row_pins(row_pins): 105def row_pins(row_pins):
106 """Return the config.h lines that set the row pins. 106 """Return the config.h lines that set the row pins.
107 """ 107 """
108 rows = ','.join(row_pins) 108 rows = ','.join(map(str, [pin or 'NO_PIN' for pin in row_pins]))
109 row_num = len(row_pins) 109 row_num = len(row_pins)
110 110
111 return """ 111 return """