Skip to content

Commit

Permalink
Fix up qmk find when not specifying filters. (qmk#21059)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored and autoferrit committed Dec 6, 2023
1 parent 6df1e1b commit f996d76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/python/qmk/cli/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
def find(cli):
"""Search through all keyboards and keymaps for a given search criteria.
"""

if len(cli.args.filter) == 0 and len(cli.args.print) > 0:
cli.log.warning('No filters supplied -- keymaps not parsed, unable to print requested values.')

targets = search_keymap_targets(cli.args.keymap, cli.args.filter, cli.args.print)
for keyboard, keymap, print_vals in targets:
print(f'{keyboard}:{keymap}')
Expand Down
2 changes: 1 addition & 1 deletion lib/python/qmk/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def search_keymap_targets(keymap='default', filters=[], print_vals=[]):
target_list = [(kb, keymap) for kb in filter(lambda kb: kb is not None, pool.starmap(_keymap_exists, [(kb, keymap) for kb in qmk.keyboard.list_keyboards()]))]

if len(filters) == 0:
targets = target_list
targets = [(kb, km, {}) for kb, km in target_list]
else:
cli.log.info('Parsing data for all matching keyboard/keymap combinations...')
valid_keymaps = [(e[0], e[1], dotty(e[2])) for e in pool.starmap(_load_keymap_info, target_list)]
Expand Down

0 comments on commit f996d76

Please sign in to comment.