From 767dfbbd3f94dcddb2061cd8338dd166d985df9d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 15 Dec 2024 04:00:18 +0000 Subject: [PATCH] Resolve `cli.log.warn` warnings (#24551) --- lib/python/qmk/cli/doctor/main.py | 6 +++--- lib/python/qmk/cli/import/kbfirmware.py | 2 +- lib/python/qmk/cli/userspace/list.py | 2 +- lib/python/qmk/git.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/python/qmk/cli/doctor/main.py b/lib/python/qmk/cli/doctor/main.py index 5215d3a7eee..391353ebbfb 100755 --- a/lib/python/qmk/cli/doctor/main.py +++ b/lib/python/qmk/cli/doctor/main.py @@ -102,10 +102,10 @@ def userspace_tests(qmk_firmware): qmk_userspace_validate(path) cli.log.info(f'Testing userspace candidate: {{fg_cyan}}{path}{{fg_reset}} -- {{fg_green}}Valid `qmk.json`') except FileNotFoundError: - cli.log.warn(f'Testing userspace candidate: {{fg_cyan}}{path}{{fg_reset}} -- {{fg_red}}Missing `qmk.json`') + cli.log.warning(f'Testing userspace candidate: {{fg_cyan}}{path}{{fg_reset}} -- {{fg_red}}Missing `qmk.json`') except UserspaceValidationError as err: - cli.log.warn(f'Testing userspace candidate: {{fg_cyan}}{path}{{fg_reset}} -- {{fg_red}}Invalid `qmk.json`') - cli.log.warn(f' -- {{fg_cyan}}{path}/qmk.json{{fg_reset}} validation error: {err}') + cli.log.warning(f'Testing userspace candidate: {{fg_cyan}}{path}{{fg_reset}} -- {{fg_red}}Invalid `qmk.json`') + cli.log.warning(f' -- {{fg_cyan}}{path}/qmk.json{{fg_reset}} validation error: {err}') if QMK_USERSPACE is not None: cli.log.info(f'QMK userspace: {{fg_cyan}}{QMK_USERSPACE}') diff --git a/lib/python/qmk/cli/import/kbfirmware.py b/lib/python/qmk/cli/import/kbfirmware.py index 9c03737378c..feccb3cfcc6 100644 --- a/lib/python/qmk/cli/import/kbfirmware.py +++ b/lib/python/qmk/cli/import/kbfirmware.py @@ -15,7 +15,7 @@ def import_kbfirmware(cli): cli.log.info(f'{{style_bright}}Importing {filename.name}.{{style_normal}}') cli.echo('') - cli.log.warn("Support here is basic - Consider using 'qmk new-keyboard' instead") + cli.log.warning("Support here is basic - Consider using 'qmk new-keyboard' instead") kb_name = _import_kbfirmware(data) diff --git a/lib/python/qmk/cli/userspace/list.py b/lib/python/qmk/cli/userspace/list.py index 9f83a14a2a6..e902483b6bb 100644 --- a/lib/python/qmk/cli/userspace/list.py +++ b/lib/python/qmk/cli/userspace/list.py @@ -66,4 +66,4 @@ def userspace_list(cli): if is_all_keyboards(keyboard) or is_keymap_target(keyboard_folder(keyboard), keymap): cli.log.info(f'Keyboard: {{fg_cyan}}{keyboard}{{fg_reset}}, keymap: {{fg_cyan}}{keymap}{{fg_reset}}{extra_args_str}') else: - cli.log.warn(f'Keyboard: {{fg_cyan}}{keyboard}{{fg_reset}}, keymap: {{fg_cyan}}{keymap}{{fg_reset}}{extra_args_str} -- not found!') + cli.log.warning(f'Keyboard: {{fg_cyan}}{keyboard}{{fg_reset}}, keymap: {{fg_cyan}}{keymap}{{fg_reset}}{extra_args_str} -- not found!') diff --git a/lib/python/qmk/git.py b/lib/python/qmk/git.py index b6c11edbfe8..9d567475d81 100644 --- a/lib/python/qmk/git.py +++ b/lib/python/qmk/git.py @@ -26,7 +26,7 @@ def git_get_version(repo_dir='.', check_dir='.'): return git_describe.stdout.strip() else: - cli.log.warn(f'"{" ".join(git_describe_cmd)}" returned error code {git_describe.returncode}') + cli.log.warning(f'"{" ".join(git_describe_cmd)}" returned error code {git_describe.returncode}') print(git_describe.stderr) return None