diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-03-13 15:47:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 15:47:04 -0700 |
commit | f81b0e35a6a25a9a6e633dc65a4900bed2458cfb (patch) | |
tree | 707e06f6cd2caeda4278cfd9751ee77bf15aa055 /lib/python/qmk/cli/__init__.py | |
parent | 5e98eaaaff8fde1ce25b9bad6c00a982718cb467 (diff) | |
download | qmk_firmware-f81b0e35a6a25a9a6e633dc65a4900bed2458cfb.tar.gz qmk_firmware-f81b0e35a6a25a9a6e633dc65a4900bed2458cfb.zip |
Add decorators for determining keyboard and keymap based on current directory (#8191)
* Use pathlib everywhere we can
* Improvements based on @erovia's feedback
* rework qmk compile and qmk flash to use pathlib
* style
* Remove the subcommand_name argument from find_keyboard_keymap()
* add experimental decorators
* Create decorators for finding keyboard and keymap based on current directory.
Decorators were inspired by @Erovia's brilliant work on the proof of concept.
Diffstat (limited to 'lib/python/qmk/cli/__init__.py')
-rw-r--r-- | lib/python/qmk/cli/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 5149a6215..eb524217c 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup. | 3 | We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup. |
4 | """ | 4 | """ |
5 | from milc import cli | ||
6 | |||
5 | from . import cformat | 7 | from . import cformat |
6 | from . import compile | 8 | from . import compile |
7 | from . import config | 9 | from . import config |
@@ -16,3 +18,6 @@ from . import kle2json | |||
16 | from . import new | 18 | from . import new |
17 | from . import pyformat | 19 | from . import pyformat |
18 | from . import pytest | 20 | from . import pytest |
21 | |||
22 | if not hasattr(cli, 'config_source'): | ||
23 | cli.log.warning("Your QMK CLI is out of date. Please upgrade with `pip3 install --upgrade qmk` or by using your package manager.") | ||