def __init__(self, *args, comment=None, parameters=None, returns=None, optional_keys=None, **kargs): super().__init__(*args, **kargs) self.parameters = parameters or {} self.comment = comment self.return_data = Type.serialize(returns, optional_keys)
def update_rule_with_meta(self, request = None, session_store=None): m = self.get_method(request, session_store) if hasattr(m, "meta"): if "comment" in m.meta: self.set_comment(m.meta["comment"]) if "return" in m.meta: optional_keys = [] if "optional_keys" in m.meta: optional_keys = m.meta["optional_keys"] self.return_data = Type.serialize(m.meta["return"], optional_keys) if "parameters" in m.meta: self.set_parameters(m.meta["parameters"]) if "not_implemented" in m.meta: self.not_implemented = True return m
def update_rule_with_meta(self, request=None, session_store=None): m = self.get_method(request, session_store) if hasattr(m, "meta"): if "comment" in m.meta: self.set_comment(m.meta["comment"]) if "return" in m.meta: optional_keys = [] if "optional_keys" in m.meta: optional_keys = m.meta["optional_keys"] self.return_data = Type.serialize(m.meta["return"], optional_keys) if "parameters" in m.meta: self.set_parameters(m.meta["parameters"]) if "not_implemented" in m.meta: self.not_implemented = True return m
def __init__(self, *args, comment = None, parameters = None, returns = None, optional_keys=None, **kargs): super().__init__(*args, **kargs) self.parameters = parameters or {} self.comment = comment self.return_data = Type.serialize(returns, optional_keys)