diff options
Diffstat (limited to 'lib/python/qmk/cli/generate/keyboard_h.py')
-rwxr-xr-x | lib/python/qmk/cli/generate/keyboard_h.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/generate/keyboard_h.py b/lib/python/qmk/cli/generate/keyboard_h.py index 22500dbc9..c9d7f549b 100755 --- a/lib/python/qmk/cli/generate/keyboard_h.py +++ b/lib/python/qmk/cli/generate/keyboard_h.py | |||
@@ -2,7 +2,6 @@ | |||
2 | """ | 2 | """ |
3 | from milc import cli | 3 | from milc import cli |
4 | 4 | ||
5 | from qmk.decorators import automagic_keyboard, automagic_keymap | ||
6 | from qmk.info import info_json | 5 | from qmk.info import info_json |
7 | from qmk.keyboard import keyboard_completer, keyboard_folder | 6 | from qmk.keyboard import keyboard_completer, keyboard_folder |
8 | from qmk.path import normpath | 7 | from qmk.path import normpath |
@@ -29,14 +28,12 @@ def would_populate_layout_h(keyboard): | |||
29 | 28 | ||
30 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') | 29 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') |
31 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") | 30 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") |
32 | @cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.') | 31 | @cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.') |
33 | @cli.subcommand('Used by the make system to generate keyboard.h from info.json', hidden=True) | 32 | @cli.subcommand('Used by the make system to generate keyboard.h from info.json', hidden=True) |
34 | @automagic_keyboard | ||
35 | @automagic_keymap | ||
36 | def generate_keyboard_h(cli): | 33 | def generate_keyboard_h(cli): |
37 | """Generates the keyboard.h file. | 34 | """Generates the keyboard.h file. |
38 | """ | 35 | """ |
39 | has_layout_h = would_populate_layout_h(cli.config.generate_keyboard_h.keyboard) | 36 | has_layout_h = would_populate_layout_h(cli.args.keyboard) |
40 | 37 | ||
41 | # Build the layouts.h file. | 38 | # Build the layouts.h file. |
42 | keyboard_h_lines = ['/* This file was generated by `qmk generate-keyboard-h`. Do not edit or copy.' ' */', '', '#pragma once', '#include "quantum.h"'] | 39 | keyboard_h_lines = ['/* This file was generated by `qmk generate-keyboard-h`. Do not edit or copy.' ' */', '', '#pragma once', '#include "quantum.h"'] |