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

[kle2json] fix rounding in output #8931

Merged
merged 2 commits into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions lib/python/kle2xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def parse_layout(self, layout): # noqa FIXME(skullydazed): flake8 says this ha

else:
current_key['name'] = key
current_key['row'] = current_row
current_key['column'] = current_col
current_key['row'] = round(current_row, 2)
current_key['column'] = round(current_col, 2)

# Determine the X center
x_center = (current_key['width'] * self.key_width) / 2
Expand Down
2 changes: 1 addition & 1 deletion lib/python/qmk/cli/kle2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def kle2json(cli):
# Replace layout in keyboard json
keyboard = keyboard.replace('"LAYOUT_JSON_HERE"', layout)
# Write our info.json
file = open(out_path + "/info.json", "w")
file = open(out_path / "info.json", "w")
file.write(keyboard)
file.close()
cli.log.info('Wrote out {fg_cyan}%s/info.json', out_path)