diff options
| author | Joel Challis <git@zvecr.com> | 2025-11-23 05:02:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 05:02:32 +0000 |
| commit | 28a11ff6f7a721820cc335287e44e2fefe22ac71 (patch) | |
| tree | f2a647d80b368bea3727c7f591ff73cd814e759e /lib | |
| parent | 1a7f544e0df833f9709aaa724f9fd8b5c5c274de (diff) | |
Fix preference of output file for 'qmk generate-autocorrect-data' (#25818)
Diffstat (limited to 'lib')
| -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: | |||
| 250 | 250 | ||
| 251 | 251 | ||
| 252 | @cli.argument('filename', type=normpath, help='The autocorrection database file') | 252 | @cli.argument('filename', type=normpath, help='The autocorrection database file') |
| 253 | @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.') | 253 | @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.') |
| 254 | @cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') | 254 | @cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a output file is supplied.') |
| 255 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') | 255 | @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') |
| 256 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") | 256 | @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") |
| 257 | @cli.subcommand('Generate the autocorrection data file from a dictionary file.') | 257 | @cli.subcommand('Generate the autocorrection data file from a dictionary file.') |
| @@ -263,7 +263,7 @@ def generate_autocorrect_data(cli): | |||
| 263 | current_keyboard = cli.args.keyboard or cli.config.user.keyboard or cli.config.generate_autocorrect_data.keyboard | 263 | current_keyboard = cli.args.keyboard or cli.config.user.keyboard or cli.config.generate_autocorrect_data.keyboard |
| 264 | current_keymap = cli.args.keymap or cli.config.user.keymap or cli.config.generate_autocorrect_data.keymap | 264 | current_keymap = cli.args.keymap or cli.config.user.keymap or cli.config.generate_autocorrect_data.keymap |
| 265 | 265 | ||
| 266 | if current_keyboard and current_keymap: | 266 | if not cli.args.output and current_keyboard and current_keymap: |
| 267 | cli.args.output = locate_keymap(current_keyboard, current_keymap).parent / 'autocorrect_data.h' | 267 | cli.args.output = locate_keymap(current_keyboard, current_keymap).parent / 'autocorrect_data.h' |
| 268 | 268 | ||
| 269 | assert all(0 <= b <= 255 for b in data) | 269 | assert all(0 <= b <= 255 for b in data) |
