summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/list
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2020-03-13 15:47:04 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit6eb6e4669ab88bed501e92da699056ef5f8c766d (patch)
treec2a1008ff5e0aaf0fdc4458ab1e1589f7439ecbb /lib/python/qmk/cli/list
parent662ff6623ab33f52786f0f81b709c16a37c19e07 (diff)
Add decorators for determining keyboard and keymap based on current directory (#8191)
* Use pathlib everywhere we can * Improvements based on @erovia's feedback * rework qmk compile and qmk flash to use pathlib * style * Remove the subcommand_name argument from find_keyboard_keymap() * add experimental decorators * Create decorators for finding keyboard and keymap based on current directory. Decorators were inspired by @Erovia's brilliant work on the proof of concept.
Diffstat (limited to 'lib/python/qmk/cli/list')
-rw-r--r--lib/python/qmk/cli/list/keymaps.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py
index d199d29bc3..cec9ca0224 100644
--- a/lib/python/qmk/cli/list/keymaps.py
+++ b/lib/python/qmk/cli/list/keymaps.py
@@ -1,12 +1,15 @@
"""List the keymaps for a specific keyboard
"""
from milc import cli
+
import qmk.keymap
+from qmk.decorators import automagic_keyboard
from qmk.errors import NoSuchKeyboardError
@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
@cli.subcommand("List the keymaps for a specific keyboard")
+@automagic_keyboard
def list_keymaps(cli):
"""List the keymaps for a specific keyboard
"""