aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/qmk/cli/config.py2
-rw-r--r--lib/python/qmk/cli/list/keyboards.py1
-rw-r--r--lib/python/qmk/errors.py1
-rw-r--r--lib/python/qmk/tests/attrdict.py1
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py2
-rw-r--r--lib/python/qmk/tests/test_qmk_path.py2
6 files changed, 4 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/config.py b/lib/python/qmk/cli/config.py
index d6c774e65..c4ee20cba 100644
--- a/lib/python/qmk/cli/config.py
+++ b/lib/python/qmk/cli/config.py
@@ -12,7 +12,7 @@ def print_config(section, key):
12 cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) 12 cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key])
13 13
14 14
15@cli.argument('-ro', '--read-only', action='store_true', help='Operate in read-only mode.') 15@cli.argument('-ro', '--read-only', arg_only=True, action='store_true', help='Operate in read-only mode.')
16@cli.argument('configs', nargs='*', arg_only=True, help='Configuration options to read or write.') 16@cli.argument('configs', nargs='*', arg_only=True, help='Configuration options to read or write.')
17@cli.subcommand("Read and write configuration settings.") 17@cli.subcommand("Read and write configuration settings.")
18def config(cli): 18def config(cli):
diff --git a/lib/python/qmk/cli/list/keyboards.py b/lib/python/qmk/cli/list/keyboards.py
index 53a7af75c..2a29ccb14 100644
--- a/lib/python/qmk/cli/list/keyboards.py
+++ b/lib/python/qmk/cli/list/keyboards.py
@@ -6,6 +6,7 @@ import glob
6 6
7from milc import cli 7from milc import cli
8 8
9
9@cli.subcommand("List the keyboards currently defined within QMK") 10@cli.subcommand("List the keyboards currently defined within QMK")
10def list_keyboards(cli): 11def list_keyboards(cli):
11 """List the keyboards currently defined within QMK 12 """List the keyboards currently defined within QMK
diff --git a/lib/python/qmk/errors.py b/lib/python/qmk/errors.py
index f9bf5b9af..4a8a91556 100644
--- a/lib/python/qmk/errors.py
+++ b/lib/python/qmk/errors.py
@@ -1,6 +1,5 @@
1class NoSuchKeyboardError(Exception): 1class NoSuchKeyboardError(Exception):
2 """Raised when we can't find a keyboard/keymap directory. 2 """Raised when we can't find a keyboard/keymap directory.
3 """ 3 """
4
5 def __init__(self, message): 4 def __init__(self, message):
6 self.message = message 5 self.message = message
diff --git a/lib/python/qmk/tests/attrdict.py b/lib/python/qmk/tests/attrdict.py
index 391c75c4e..a2584b923 100644
--- a/lib/python/qmk/tests/attrdict.py
+++ b/lib/python/qmk/tests/attrdict.py
@@ -3,7 +3,6 @@ class AttrDict(dict):
3 3
4 This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests. 4 This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests.
5 """ 5 """
6
7 def __init__(self, *args, **kwargs): 6 def __init__(self, *args, **kwargs):
8 super(AttrDict, self).__init__(*args, **kwargs) 7 super(AttrDict, self).__init__(*args, **kwargs)
9 self.__dict__ = self 8 self.__dict__ = self
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 9a9dc4b95..55b8d253f 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -7,7 +7,7 @@ def check_subcommand(command, *args):
7 7
8 8
9def test_cformat(): 9def test_cformat():
10 assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0 10 assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0
11 11
12 12
13def test_compile(): 13def test_compile():
diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py
index 94dbf3a6a..d6961a0f6 100644
--- a/lib/python/qmk/tests/test_qmk_path.py
+++ b/lib/python/qmk/tests/test_qmk_path.py
@@ -10,4 +10,4 @@ def test_keymap_onekey_pytest():
10 10
11def test_normpath(): 11def test_normpath():
12 path = qmk.path.normpath('lib/python') 12 path = qmk.path.normpath('lib/python')
13 assert path == os.environ['ORIG_CWD'] + '/lib/python' 13 assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python')