Temp changes
parent
c2a2e010f1
commit
a806215054
|
@ -183,6 +183,9 @@ def removeRelaventFields(key, data, bindType):
|
|||
errMsgs.append('impulse requires `command` argument')
|
||||
else:
|
||||
content.pop("command")
|
||||
else:
|
||||
if not isinstance(content, str) and not isinstance(content, list):
|
||||
errMsgs.append(f'impulse must be a single string or list')
|
||||
|
||||
elif bindType == "toggle":
|
||||
if isinstance(content, dict):
|
||||
|
@ -227,10 +230,10 @@ def removeRelaventFields(key, data, bindType):
|
|||
if not validKey(condition):
|
||||
errMsgs.append(f'Invalid condition to toggle "{condition}"')
|
||||
|
||||
if "cancel both" in content:
|
||||
cancelBoth = content["cancel both"]
|
||||
if not isinstance(cancelBoth, bool):
|
||||
errMsgs.append(f'"cancel both" field in "{key}" makes no sense: "{cancelBoth}"')
|
||||
if "cancel" in content:
|
||||
canType = content["cancel"]
|
||||
if canType not in ["released", "both"]:
|
||||
errMsgs.append(f'"cancel" must be either "released" or "both", not {canType}')
|
||||
|
||||
elif bindType == "repeat":
|
||||
unit = "s"
|
||||
|
|
Loading…
Reference in New Issue