summaryrefslogtreecommitdiff
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.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index e6d49ea4d5..ccea6d7a05 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -6,7 +6,9 @@ from dotty_dict import dotty
from milc import cli
from qmk.decorators import automagic_keyboard, automagic_keymap
-from qmk.info import _json_load, info_json
+from qmk.info import info_json
+from qmk.json_schema import json_load
+from qmk.keyboard import keyboard_folder
from qmk.path import is_keyboard, normpath
@@ -73,7 +75,7 @@ def matrix_pins(matrix_pins):
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
-@cli.argument('-kb', '--keyboard', help='Keyboard to generate config.h for.')
+@cli.argument('-kb', '--keyboard', type=keyboard_folder, help='Keyboard to generate config.h for.')
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
@automagic_keyboard
@automagic_keymap
@@ -92,7 +94,7 @@ def generate_config_h(cli):
# Build the info_config.h file.
kb_info_json = dotty(info_json(cli.config.generate_config_h.keyboard))
- info_config_map = _json_load(Path('data/mappings/info_config.json'))
+ info_config_map = json_load(Path('data/mappings/info_config.json'))
config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once']