Fix parsing/validation for 21939 (#22148)

master
Joel Challis 2023-09-27 03:57:37 +01:00 committed by GitHub
parent 32de27bb20
commit 4e86dca49d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -404,7 +404,7 @@
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"react_on_keyup": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "react_on_keyup": {"type": "boolean"},
"sleep": {"type": "boolean"}, "sleep": {"type": "boolean"},
"split_count": { "split_count": {
"type": "array", "type": "array",
@ -460,7 +460,7 @@
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"react_on_keyup": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "react_on_keyup": {"type": "boolean"},
"sleep": {"type": "boolean"}, "sleep": {"type": "boolean"},
"split_count": { "split_count": {
"type": "array", "type": "array",

View File

@ -520,6 +520,8 @@ def _config_to_json(key_type, config_value):
return list(map(str.strip, config_value.split(','))) return list(map(str.strip, config_value.split(',')))
elif key_type == 'bool': elif key_type == 'bool':
if isinstance(config_value, bool):
return config_value
return config_value in true_values return config_value in true_values
elif key_type == 'hex': elif key_type == 'hex':