diff options
| author | Joel Challis | 2025-11-23 06:02:32 +0100 |
|---|---|---|
| committer | GitHub | 2025-11-23 06:02:32 +0100 |
| commit | 28a11ff6f7a721820cc335287e44e2fefe22ac71 (patch) | |
| tree | f2a647d80b368bea3727c7f591ff73cd814e759e /lib/python | |
| parent | 1a7f544e0df833f9709aaa724f9fd8b5c5c274de (diff) | |
Fix preference of output file for 'qmk generate-autocorrect-data' (#25818)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/qmk/cli/generate/autocorrect_data.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/generate/autocorrect_data.py b/lib/python/qmk/cli/generate/autocorrect_data.py index 01a29b46fe..4f322adce2 100644 --- a/lib/python/qmk/cli/generate/autocorrect_data.py +++ b/lib/python/qmk/cli/generate/autocorrect_data.py @@ -250,8 +250,8 @@ def to_hex(b: int) -> str: @cli.argument('filename', type=normpath, help='The autocorrection database file') -@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') -@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') +@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Ignored when a output file is supplied.') +@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a output file is supplied.') @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.subcommand('Generate the autocorrection data file from a dictionary file.') @@ -263,7 +263,7 @@ def generate_autocorrect_data(cli): current_keyboard = cli.args.keyboard or cli.config.user.keyboard or cli.config.generate_autocorrect_data.keyboard current_keymap = cli.args.keymap or cli.config.user.keymap or cli.config.generate_autocorrect_data.keymap - if current_keyboard and current_keymap: + if not cli.args.output and current_keyboard and current_keymap: cli.args.output = locate_keymap(current_keyboard, current_keymap).parent / 'autocorrect_data.h' assert all(0 <= b <= 255 for b in data) |