From d3754c0835473602c36639449f03fcf8f42d8ad7 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 16 May 2021 11:06:57 -0700 Subject: [PATCH] Use milc.subcommand.config instead of qmk.cli.config * Use milc.subcommand.config instead * pyformat * remove the config test --- lib/python/qmk/cli/__init__.py | 2 +- lib/python/qmk/cli/config.py | 116 ---------------------- lib/python/qmk/tests/test_cli_commands.py | 6 -- 3 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 lib/python/qmk/cli/config.py diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 6fe769fe7b10..be5ba90ad74a 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -140,7 +140,7 @@ def _broken_module_imports(requirements): from . import chibios # noqa from . import clean # noqa from . import compile # noqa -from . import config # noqa +from milc.subcommand import config # noqa from . import docs # noqa from . import doctor # noqa from . import fileformat # noqa diff --git a/lib/python/qmk/cli/config.py b/lib/python/qmk/cli/config.py deleted file mode 100644 index e17d8bb9ba0e..000000000000 --- a/lib/python/qmk/cli/config.py +++ /dev/null @@ -1,116 +0,0 @@ -"""Read and write configuration settings -""" -from milc import cli - - -def print_config(section, key): - """Print a single config setting to stdout. - """ - cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) - - -def show_config(): - """Print the current configuration to stdout. - """ - for section in cli.config: - for key in cli.config[section]: - print_config(section, key) - - -def parse_config_token(config_token): - """Split a user-supplied configuration-token into its components. - """ - section = option = value = None - - if '=' in config_token and '.' not in config_token: - cli.log.error('Invalid configuration token, the key must be of the form
.