Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling json files #9210

Merged
merged 2 commits into from
May 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/python/qmk/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"""
from pathlib import Path

from qmk.path import is_keyboard
from qmk.keyboard import rules_mk
import qmk.path

# The `keymap.c` template to use when a keyboard doesn't have its own
DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H
Expand Down Expand Up @@ -103,7 +103,7 @@ def write(keyboard, keymap, layout, layers):
An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode.
"""
keymap_c = generate(keyboard, layout, layers)
keymap_file = keymap(keyboard) / keymap / 'keymap.c'
keymap_file = qmk.path.keymap(keyboard) / 'keymap.c'

keymap_file.parent.mkdir(parents=True, exist_ok=True)
keymap_file.write_text(keymap_c)
Expand All @@ -114,7 +114,7 @@ def write(keyboard, keymap, layout, layers):
def locate_keymap(keyboard, keymap):
"""Returns the path to a keymap for a specific keyboard.
"""
if not is_keyboard(keyboard):
if not qmk.path.is_keyboard(keyboard):
raise KeyError('Invalid keyboard: ' + repr(keyboard))

# Check the keyboard folder first, last match wins
Expand Down