diff options
author | Zach White <[email protected]> | 2020-05-26 13:05:41 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-26 13:05:41 -0700 |
commit | 751316c34465ea77e066c3052729b207f3d62e0c (patch) | |
tree | cb99656b93c156757e2fd7c84fe716f9c300ca89 /lib/python/qmk/path.py | |
parent | 5d3bf8a050f3c0beb1f91147dc1ab54de36cbb05 (diff) | |
download | qmk_firmware-751316c34465ea77e066c3052729b207f3d62e0c.tar.gz qmk_firmware-751316c34465ea77e066c3052729b207f3d62e0c.zip |
[CLI] Add a subcommand for getting information about a keyboard (#8666)0.8.188
You can now use `qmk info` to get information about keyboards and keymaps.
Co-authored-by: Erovia <[email protected]>
Diffstat (limited to 'lib/python/qmk/path.py')
-rw-r--r-- | lib/python/qmk/path.py | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 7306c433b8..8df6f0e915 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -4,20 +4,10 @@ import logging import os from pathlib import Path -from qmk.constants import QMK_FIRMWARE, MAX_KEYBOARD_SUBFOLDERS +from qmk.constants import MAX_KEYBOARD_SUBFOLDERS, QMK_FIRMWARE from qmk.errors import NoSuchKeyboardError -def is_keymap_dir(keymap_path): - """Returns True if `keymap_path` is a valid keymap directory. - """ - keymap_path = Path(keymap_path) - keymap_c = keymap_path / 'keymap.c' - keymap_json = keymap_path / 'keymap.json' - - return any((keymap_c.exists(), keymap_json.exists())) - - def is_keyboard(keyboard_name): """Returns True if `keyboard_name` is a keyboard we can compile. """ @@ -68,17 +58,3 @@ def normpath(path): return path return Path(os.environ['ORIG_CWD']) / path - - -def c_source_files(dir_names): - """Returns a list of all *.c, *.h, and *.cpp files for a given list of directories - - Args: - - dir_names - List of directories, relative pathing starts at qmk's cwd - """ - files = [] - for dir in dir_names: - files.extend(file for file in Path(dir).glob('**/*') if file.suffix in ['.c', '.h', '.cpp']) - return files |