cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key])
-@cli.argument('-ro', '--read-only', action='store_true', help='Operate in read-only mode.')
+@cli.argument('-ro', '--read-only', arg_only=True, action='store_true', help='Operate in read-only mode.')
@cli.argument('configs', nargs='*', arg_only=True, help='Configuration options to read or write.')
@cli.subcommand("Read and write configuration settings.")
def config(cli):
from milc import cli
+
@cli.subcommand("List the keyboards currently defined within QMK")
def list_keyboards(cli):
"""List the keyboards currently defined within QMK
class NoSuchKeyboardError(Exception):
"""Raised when we can't find a keyboard/keymap directory.
"""
-
def __init__(self, message):
self.message = message
This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests.
"""
-
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
def test_cformat():
- assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0
+ assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0
def test_compile():
def test_normpath():
path = qmk.path.normpath('lib/python')
- assert path == os.environ['ORIG_CWD'] + '/lib/python'
+ assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python')