From e13bb58c40c2c4473be3fefe144b5b7144ebbb5d Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Sat, 25 Jun 2022 21:40:49 +0200 Subject: Only omit paths containing "/keymaps/" (#17468) This allows keyboard names to contain the word "keymaps" --- lib/python/qmk/keyboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py index e69f63aebe..686d4fc403 100644 --- a/lib/python/qmk/keyboard.py +++ b/lib/python/qmk/keyboard.py @@ -103,7 +103,7 @@ def list_keyboards(): """ # We avoid pathlib here because this is performance critical code. kb_wildcard = os.path.join(base_path, "**", "rules.mk") - paths = [path for path in glob(kb_wildcard, recursive=True) if 'keymaps' not in path] + paths = [path for path in glob(kb_wildcard, recursive=True) if os.path.sep + 'keymaps' + os.path.sep not in path] return sorted(set(map(resolve_keyboard, map(_find_name, paths)))) -- cgit v1.2.3