Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus. Rebased on master and fixed merge conflicts.
This commit is contained in:
parent
988bfffca2
commit
8eeab1112a
5 changed files with 18 additions and 5 deletions
|
@ -4,13 +4,16 @@ from milc import cli
|
|||
import qmk.keymap
|
||||
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")
|
||||
def list_keymaps(cli):
|
||||
"""List the keymaps for a specific keyboard
|
||||
"""
|
||||
# ask for user input if keyboard was not provided in the command line
|
||||
if not cli.config.list_keymaps.keyboard:
|
||||
if cli.args.keyboard:
|
||||
cli.config.list_keymaps.keyboard = cli.args.keyboard
|
||||
elif not cli.config.list_keymaps.keyboard:
|
||||
cli.config.list_keymaps.keyboard = input("Keyboard Name: ")
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue