rename config option args to options

This commit is contained in:
2021-10-08 13:09:16 +02:00
parent 97915498e1
commit f99fc24e64
7 changed files with 252 additions and 31 deletions

View File

@@ -269,7 +269,7 @@ class ActionConfig(BaseConfig):
JSON_SCHEMA = {
"type": "object",
"required": ["name", "type", "args"],
"required": ["name", "type", "options"],
"additionalProperties": False,
"properties": {
"name": {"type": "string"},
@@ -277,14 +277,14 @@ class ActionConfig(BaseConfig):
"pretend": {"type": "boolean", "default": False},
"conditions": {"type": "object"},
"type": {"enum": list(ACTION_TYPES.keys())},
"args": {"type": "object"}}}
"options": {"type": "object"}}}
def __init__(self, config, rec=True):
super().__init__(config)
if rec:
if "conditions" in self:
self["conditions"] = ConditionsConfig(self["conditions"])
self["action"] = self.ACTION_TYPES[self["type"]](self["args"])
self["action"] = self.ACTION_TYPES[self["type"]](self["options"])
class RuleConfig(BaseConfig):