diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-03-13 15:47:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 15:47:04 -0700 |
commit | f81b0e35a6a25a9a6e633dc65a4900bed2458cfb (patch) | |
tree | 707e06f6cd2caeda4278cfd9751ee77bf15aa055 /lib/python/qmk/cli/list/keymaps.py | |
parent | 5e98eaaaff8fde1ce25b9bad6c00a982718cb467 (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/keymaps.py')
-rw-r--r-- | lib/python/qmk/cli/list/keymaps.py | 3 |
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 """ |