aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/list/keymaps.py
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2020-03-13 15:47:04 -0700
committerGitHub <noreply@github.com>2020-03-13 15:47:04 -0700
commitf81b0e35a6a25a9a6e633dc65a4900bed2458cfb (patch)
tree707e06f6cd2caeda4278cfd9751ee77bf15aa055 /lib/python/qmk/cli/list/keymaps.py
parent5e98eaaaff8fde1ce25b9bad6c00a982718cb467 (diff)
downloadqmk_firmware-f81b0e35a6a25a9a6e633dc65a4900bed2458cfb.tar.gz
qmk_firmware-f81b0e35a6a25a9a6e633dc65a4900bed2458cfb.zip
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/keymaps.py')
-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 d199d29bc..cec9ca022 100644
--- a/lib/python/qmk/cli/list/keymaps.py
+++ b/lib/python/qmk/cli/list/keymaps.py
@@ -1,12 +1,15 @@
1"""List the keymaps for a specific keyboard 1"""List the keymaps for a specific keyboard
2""" 2"""
3from milc import cli 3from milc import cli
4
4import qmk.keymap 5import qmk.keymap
6from qmk.decorators import automagic_keyboard
5from qmk.errors import NoSuchKeyboardError 7from qmk.errors import NoSuchKeyboardError
6 8
7 9
8@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") 10@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
9@cli.subcommand("List the keymaps for a specific keyboard") 11@cli.subcommand("List the keymaps for a specific keyboard")
12@automagic_keyboard
10def list_keymaps(cli): 13def list_keymaps(cli):
11 """List the keymaps for a specific keyboard 14 """List the keymaps for a specific keyboard
12 """ 15 """