From f81b0e35a6a25a9a6e633dc65a4900bed2458cfb Mon Sep 17 00:00:00 2001 From: skullydazed Date: Fri, 13 Mar 2020 15:47:04 -0700 Subject: 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. --- lib/python/qmk/cli/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/python/qmk/cli/__init__.py') 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 @@ We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup. """ +from milc import cli + from . import cformat from . import compile from . import config @@ -16,3 +18,6 @@ from . import kle2json from . import new from . import pyformat from . import pytest + +if not hasattr(cli, 'config_source'): + cli.log.warning("Your QMK CLI is out of date. Please upgrade with `pip3 install --upgrade qmk` or by using your package manager.") -- cgit v1.2.3