diff options
Diffstat (limited to 'lib/python/qmk/importers.py')
-rw-r--r-- | lib/python/qmk/importers.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/python/qmk/importers.py b/lib/python/qmk/importers.py index 307c66ee3c..8c449a7194 100644 --- a/lib/python/qmk/importers.py +++ b/lib/python/qmk/importers.py @@ -5,7 +5,7 @@ import json from qmk.git import git_get_username from qmk.json_schema import validate -from qmk.path import keyboard, keymap +from qmk.path import keyboard, keymaps from qmk.constants import MCU2BOOTLOADER, LEGACY_KEYCODES from qmk.json_encoders import InfoJSONEncoder, KeymapJSONEncoder from qmk.json_schema import deep_update, json_load @@ -84,14 +84,14 @@ def import_keymap(keymap_data): kb_name = keymap_data['keyboard'] km_name = keymap_data['keymap'] - km_folder = keymap(kb_name) / km_name + km_folder = keymaps(kb_name)[0] / km_name keyboard_keymap = km_folder / 'keymap.json' # This is the deepest folder in the expected tree keyboard_keymap.parent.mkdir(parents=True, exist_ok=True) # Dump out all those lovely files - keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder)) + keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder, sort_keys=True)) return (kb_name, km_name) @@ -139,8 +139,8 @@ def import_keyboard(info_data, keymap_data=None): temp = json_load(keyboard_info) deep_update(temp, info_data) - keyboard_info.write_text(json.dumps(temp, cls=InfoJSONEncoder)) - keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder)) + keyboard_info.write_text(json.dumps(temp, cls=InfoJSONEncoder, sort_keys=True)) + keyboard_keymap.write_text(json.dumps(keymap_data, cls=KeymapJSONEncoder, sort_keys=True)) return kb_name |