diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index ca76f1b2888e..8c09cc51dce1 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -40,7 +40,6 @@ #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) __MACRO_OUTPUT_GOES_HERE__ - """ @@ -51,7 +50,7 @@ def _generate_keymap_table(keymap_json): lines[-1] = lines[-1] + ',' layer = map(_strip_any, layer) layer_keys = ', '.join(layer) - lines.append('\t[%s] = %s(%s)' % (layer_num, keymap_json['layout'], layer_keys)) + lines.append(' [%s] = %s(%s)' % (layer_num, keymap_json['layout'], layer_keys)) return lines @@ -61,7 +60,7 @@ def _generate_encodermap_table(keymap_json): if layer_num != 0: lines[-1] = lines[-1] + ',' encoder_keycode_txt = ', '.join([f'ENCODER_CCW_CW({_strip_any(e["ccw"])}, {_strip_any(e["cw"])})' for e in layer]) - lines.append('\t[%s] = {%s}' % (layer_num, encoder_keycode_txt)) + lines.append(' [%s] = {%s}' % (layer_num, encoder_keycode_txt)) return lines diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 674bb54be293..2b3d6f404963 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -156,7 +156,7 @@ def test_json2c(): * edit it directly. */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -\t[0] = LAYOUT_ortho_1x1(KC_A) + [0] = LAYOUT_ortho_1x1(KC_A) }; #if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) @@ -168,7 +168,6 @@ def test_json2c(): - """ @@ -195,7 +194,7 @@ def test_json2c_stdin(): * edit it directly. */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -\t[0] = LAYOUT_ortho_1x1(KC_A) + [0] = LAYOUT_ortho_1x1(KC_A) }; #if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) @@ -207,7 +206,6 @@ def test_json2c_stdin(): - """ diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index b4b8f4bbe0a9..bec3f4006cfd 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -31,7 +31,7 @@ def test_generate_c_pytest_basic(): * edit it directly. */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -\t[0] = LAYOUT(KC_A) + [0] = LAYOUT(KC_A) }; #if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) @@ -41,7 +41,6 @@ def test_generate_c_pytest_basic(): #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) - """