diff options
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-03-24 20:33:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-24 20:33:25 -0700 |
| commit | 54b80ecf9f7def99d45dc39bbcf29baf963b6372 (patch) | |
| tree | 60f75f5287e5cc6727910a15f04e4e0e5f91c540 /lib | |
| parent | 97a73637e0c04091b793c0e555d1a36e8be24091 (diff) | |
| download | qmk_firmware-54b80ecf9f7def99d45dc39bbcf29baf963b6372.tar.gz qmk_firmware-54b80ecf9f7def99d45dc39bbcf29baf963b6372.zip | |
[CI] Format code according to conventions (#12363)
* Format code according to conventions
* Update lib/python/qmk/cli/generate/api.py
* Update lib/python/qmk/cli/generate/api.py
Co-authored-by: QMK Bot <hello@qmk.fm>
Co-authored-by: Zach White <skullydazed@gmail.com>
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/python/qmk/cli/generate/api.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/generate/api.py b/lib/python/qmk/cli/generate/api.py index 9870f7201..290590834 100755 --- a/lib/python/qmk/cli/generate/api.py +++ b/lib/python/qmk/cli/generate/api.py | |||
| @@ -19,11 +19,11 @@ def generate_api(cli): | |||
| 19 | """ | 19 | """ |
| 20 | api_data_dir = Path('api_data') | 20 | api_data_dir = Path('api_data') |
| 21 | v1_dir = api_data_dir / 'v1' | 21 | v1_dir = api_data_dir / 'v1' |
| 22 | keyboard_all_file = v1_dir / 'keyboards.json' # A massive JSON containing everything | 22 | keyboard_all_file = v1_dir / 'keyboards.json' # A massive JSON containing everything |
| 23 | keyboard_list_file = v1_dir / 'keyboard_list.json' # A simple list of keyboard targets | 23 | keyboard_list_file = v1_dir / 'keyboard_list.json' # A simple list of keyboard targets |
| 24 | keyboard_aliases_file = v1_dir / 'keyboard_aliases.json' # A list of historical keyboard names and their new name | 24 | keyboard_aliases_file = v1_dir / 'keyboard_aliases.json' # A list of historical keyboard names and their new name |
| 25 | keyboard_metadata_file = v1_dir / 'keyboard_metadata.json' # All the data configurator/via needs for initialization | 25 | keyboard_metadata_file = v1_dir / 'keyboard_metadata.json' # All the data configurator/via needs for initialization |
| 26 | usb_file = v1_dir / 'usb.json' # A mapping of USB VID/PID -> keyboard target | 26 | usb_file = v1_dir / 'usb.json' # A mapping of USB VID/PID -> keyboard target |
| 27 | 27 | ||
| 28 | if not api_data_dir.exists(): | 28 | if not api_data_dir.exists(): |
| 29 | api_data_dir.mkdir() | 29 | api_data_dir.mkdir() |
| @@ -71,6 +71,6 @@ def generate_api(cli): | |||
| 71 | 'last_updated': current_datetime(), | 71 | 'last_updated': current_datetime(), |
| 72 | 'keyboards': keyboard_list, | 72 | 'keyboards': keyboard_list, |
| 73 | 'keyboard_aliases': keyboard_aliases, | 73 | 'keyboard_aliases': keyboard_aliases, |
| 74 | 'usb': usb_list | 74 | 'usb': usb_list, |
| 75 | } | 75 | } |
| 76 | keyboard_metadata_file.write_text(json.dumps(keyboard_metadata, cls=InfoJSONEncoder)) | 76 | keyboard_metadata_file.write_text(json.dumps(keyboard_metadata, cls=InfoJSONEncoder)) |
