Only omit paths containing "/keymaps/" (#17468)

This allows keyboard names to contain the word "keymaps"
This commit is contained in:
precondition 2022-06-25 21:40:49 +02:00 committed by GitHub
parent 7fd3d76faa
commit e13bb58c40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))))