From 578102b40056693de8a92b49cd0c48e51ff4ad4a Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 6 May 2023 23:00:27 +1000 Subject: [PATCH] Fix `test_json2c_no_json()` (#20756) --- keyboards/handwired/pytest/basic/info.json | 2 +- keyboards/handwired/pytest/config.h | 6 ------ keyboards/handwired/pytest/info.json | 5 +++++ keyboards/handwired/pytest/macro/info.json | 14 +++++++------- lib/python/qmk/tests/minimal_info.json | 2 +- lib/python/qmk/tests/test_cli_commands.py | 2 +- 6 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 keyboards/handwired/pytest/config.h diff --git a/keyboards/handwired/pytest/basic/info.json b/keyboards/handwired/pytest/basic/info.json index 9cabb3e32e4a..bcd6f686b80a 100644 --- a/keyboards/handwired/pytest/basic/info.json +++ b/keyboards/handwired/pytest/basic/info.json @@ -2,7 +2,7 @@ "layouts": { "LAYOUT_custom": { "layout": [ - { "label": "KC_Q", "matrix": [0, 0], "x": 0, "y": 0 } + {"label": "KC_Q", "matrix": [0, 0], "x": 0, "y": 0} ] } } diff --git a/keyboards/handwired/pytest/config.h b/keyboards/handwired/pytest/config.h deleted file mode 100644 index a61b8f5094a9..000000000000 --- a/keyboards/handwired/pytest/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - - -#define MATRIX_COL_PINS { F4 } -#define MATRIX_ROW_PINS { F5 } -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/pytest/info.json b/keyboards/handwired/pytest/info.json index a966477f24e3..00a3bff1f6fa 100644 --- a/keyboards/handwired/pytest/info.json +++ b/keyboards/handwired/pytest/info.json @@ -7,6 +7,11 @@ "pid": "0x6465", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["F4"], + "rows": ["F5"] + }, + "diode_direction": "COL2ROW", "processor": "atmega32u4", "bootloader": "atmel-dfu", "layout_aliases": { diff --git a/keyboards/handwired/pytest/macro/info.json b/keyboards/handwired/pytest/macro/info.json index 914d5edcd622..6c2d0dea4d48 100644 --- a/keyboards/handwired/pytest/macro/info.json +++ b/keyboards/handwired/pytest/macro/info.json @@ -1,10 +1,10 @@ { - "maintainer": "qmk", - "layouts": { - "LAYOUT_custom": { - "layout": [ - { "label": "KC_Q", "matrix": [0, 0], "x": 0, "y": 0 } - ] + "maintainer": "qmk", + "layouts": { + "LAYOUT_custom": { + "layout": [ + {"label": "KC_Q", "matrix": [0, 0], "x": 0, "y": 0} + ] + } } - } } diff --git a/lib/python/qmk/tests/minimal_info.json b/lib/python/qmk/tests/minimal_info.json index 3aae4722bfec..7f5ec1f9830c 100644 --- a/lib/python/qmk/tests/minimal_info.json +++ b/lib/python/qmk/tests/minimal_info.json @@ -4,7 +4,7 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 } + {"label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0} ] } } diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 176a52a35a20..13359808a040 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -168,7 +168,7 @@ def test_json2c_wrong_json(): def test_json2c_no_json(): - result = check_subcommand('json2c', 'keyboards/handwired/pytest/config.h') + result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c') check_returncode(result, [1]) assert 'Invalid JSON encountered' in result.stdout