summaryrefslogtreecommitdiff
path: root/lib/python/qmk/makefile.py
diff options
context:
space:
mode:
authorErovia <erovia@users.noreply.github.com>2020-01-07 21:54:21 +0100
committerskullydazed <skullydazed@users.noreply.github.com>2020-02-15 15:19:03 -0800
commit8eeab1112aa1ca7336f88867a9a2ab680ae94b53 (patch)
tree60627f2d1aa5f6bb1d3345d9dbb7268b7d6ed3eb /lib/python/qmk/makefile.py
parent988bfffca2715df3f227c462533d350ecbeac6c0 (diff)
Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus. Rebased on master and fixed merge conflicts.
Diffstat (limited to 'lib/python/qmk/makefile.py')
-rw-r--r--lib/python/qmk/makefile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py
index c53f12ac75..89494bbc02 100644
--- a/lib/python/qmk/makefile.py
+++ b/lib/python/qmk/makefile.py
@@ -5,6 +5,7 @@ import os
import qmk.path
from qmk.errors import NoSuchKeyboardError
+
def parse_rules_mk_file(file, rules_mk=None):
"""Turn a rules.mk file into a dictionary.
@@ -45,12 +46,13 @@ def parse_rules_mk_file(file, rules_mk=None):
rules_mk[key.strip()] = value.strip()
else:
if ":=" in line:
- line.replace(":","")
+ line.replace(":", "")
key, value = line.split('=', 1)
rules_mk[key.strip()] = value.strip()
return rules_mk
+
def get_rules_mk(keyboard):
""" Get a rules.mk for a keyboard