diff options
| author | QMK Bot <hello@qmk.fm> | 2025-11-27 13:37:29 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2025-11-27 13:37:29 +0000 |
| commit | 9acd127cc1318d761aac76a806189fadeaaa247a (patch) | |
| tree | af6649c0034b51d0595855cbb692256ae17d97dd /lib/python/qmk/keyboard.py | |
| parent | 9ab8e4cd5a9d21f45c9f68c718c7c31765e0a321 (diff) | |
| parent | 9c2ca00074784dbee27b459d71cfc8e75f47b976 (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk/keyboard.py')
| -rw-r--r-- | lib/python/qmk/keyboard.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py index 254dc62309..e8534492c9 100644 --- a/lib/python/qmk/keyboard.py +++ b/lib/python/qmk/keyboard.py | |||
| @@ -175,8 +175,9 @@ def keyboard_completer(prefix, action, parser, parsed_args): | |||
| 175 | return list_keyboards() | 175 | return list_keyboards() |
| 176 | 176 | ||
| 177 | 177 | ||
| 178 | @lru_cache(maxsize=None) | ||
| 178 | def list_keyboards(): | 179 | def list_keyboards(): |
| 179 | """Returns a list of all keyboards | 180 | """Returns a list of all keyboards. |
| 180 | """ | 181 | """ |
| 181 | # We avoid pathlib here because this is performance critical code. | 182 | # We avoid pathlib here because this is performance critical code. |
| 182 | kb_wildcard = os.path.join(base_path, "**", 'keyboard.json') | 183 | kb_wildcard = os.path.join(base_path, "**", 'keyboard.json') |
| @@ -184,6 +185,9 @@ def list_keyboards(): | |||
| 184 | 185 | ||
| 185 | found = map(_find_name, paths) | 186 | found = map(_find_name, paths) |
| 186 | 187 | ||
| 188 | # Convert to posix paths for consistency | ||
| 189 | found = map(lambda x: str(Path(x).as_posix()), found) | ||
| 190 | |||
| 187 | return sorted(set(found)) | 191 | return sorted(set(found)) |
| 188 | 192 | ||
| 189 | 193 | ||
