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:
		@@ -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:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user