diff options
author | Nick Brassel <nick@tzarc.org> | 2023-05-27 13:23:07 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 13:23:07 +1000 |
commit | 5642bd18077061fa21f4850124a9f4eeb8f23ca3 (patch) | |
tree | 5298f764f56ec464063347ee5d8a24acfed376d9 /lib | |
parent | 363bfdbfda5ea9fa996390920a9e8982535b76c8 (diff) |
Fix up `qmk find` when not specifying filters. (#21059)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/python/qmk/cli/find.py | 4 | ||||
-rw-r--r-- | lib/python/qmk/search.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/find.py b/lib/python/qmk/cli/find.py index b8340f5f33..2836eb8a54 100644 --- a/lib/python/qmk/cli/find.py +++ b/lib/python/qmk/cli/find.py @@ -19,6 +19,10 @@ from qmk.search import search_keymap_targets 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}') diff --git a/lib/python/qmk/search.py b/lib/python/qmk/search.py index 8728890b27..c8ce85b96e 100644 --- a/lib/python/qmk/search.py +++ b/lib/python/qmk/search.py @@ -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)] |