diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2019-11-20 14:54:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 14:54:18 -0800 |
commit | f7bdc54c697ff24bec1bd0781666ac05401bafb2 (patch) | |
tree | 704511c89bd36582fcd0a4a05ae4812222d9b11c /lib/python/qmk/cli/kle2json.py | |
parent | d2115f7d1c3a314e997ec6800b6741d83115d6be (diff) | |
download | qmk_firmware-f7bdc54c697ff24bec1bd0781666ac05401bafb2.tar.gz qmk_firmware-f7bdc54c697ff24bec1bd0781666ac05401bafb2.zip |
Add flake8 to our test suite and fix all errors (#7379)
* Add flake8 to our test suite and fix all errors
* Add some documentation
Diffstat (limited to 'lib/python/qmk/cli/kle2json.py')
-rwxr-xr-x | lib/python/qmk/cli/kle2json.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py index 5a4e97e3a..00f63d362 100755 --- a/lib/python/qmk/cli/kle2json.py +++ b/lib/python/qmk/cli/kle2json.py | |||
@@ -1,10 +1,8 @@ | |||
1 | """Convert raw KLE to JSON | 1 | """Convert raw KLE to JSON |
2 | |||
3 | """ | 2 | """ |
4 | import json | 3 | import json |
5 | import os | 4 | import os |
6 | from pathlib import Path | 5 | from pathlib import Path |
7 | from argparse import FileType | ||
8 | from decimal import Decimal | 6 | from decimal import Decimal |
9 | from collections import OrderedDict | 7 | from collections import OrderedDict |
10 | 8 | ||
@@ -23,7 +21,7 @@ class CustomJSONEncoder(json.JSONEncoder): | |||
23 | return float(obj) | 21 | return float(obj) |
24 | except TypeError: | 22 | except TypeError: |
25 | pass | 23 | pass |
26 | return JSONEncoder.default(self, obj) | 24 | return json.JSONEncoder.default(self, obj) |
27 | 25 | ||
28 | 26 | ||
29 | @cli.argument('filename', help='The KLE raw txt to convert') | 27 | @cli.argument('filename', help='The KLE raw txt to convert') |