Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2021-05-30 15:18:09 +00:00
commit 0d74ed3c35

View file

@ -17,12 +17,12 @@ def automagic_keyboard(func):
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
# Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards` # Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards`
if cli.config_source[cli._entrypoint.__name__]['keyboard'] != 'argument': if cli.config_source[cli._subcommand.__name__]['keyboard'] != 'argument':
keyboard = find_keyboard_from_dir() keyboard = find_keyboard_from_dir()
if keyboard: if keyboard:
cli.config[cli._entrypoint.__name__]['keyboard'] = keyboard cli.config[cli._subcommand.__name__]['keyboard'] = keyboard
cli.config_source[cli._entrypoint.__name__]['keyboard'] = 'keyboard_directory' cli.config_source[cli._subcommand.__name__]['keyboard'] = 'keyboard_directory'
return func(*args, **kwargs) return func(*args, **kwargs)
@ -37,12 +37,12 @@ def automagic_keymap(func):
@functools.wraps(func) @functools.wraps(func)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
# Ensure that `--keymap` was not passed and that we're under `qmk_firmware` # Ensure that `--keymap` was not passed and that we're under `qmk_firmware`
if cli.config_source[cli._entrypoint.__name__]['keymap'] != 'argument': if cli.config_source[cli._subcommand.__name__]['keymap'] != 'argument':
keymap_name, keymap_type = find_keymap_from_dir() keymap_name, keymap_type = find_keymap_from_dir()
if keymap_name: if keymap_name:
cli.config[cli._entrypoint.__name__]['keymap'] = keymap_name cli.config[cli._subcommand.__name__]['keymap'] = keymap_name
cli.config_source[cli._entrypoint.__name__]['keymap'] = keymap_type cli.config_source[cli._subcommand.__name__]['keymap'] = keymap_type
return func(*args, **kwargs) return func(*args, **kwargs)