def get_all_notification_types(event=None): global _ALL_TYPES if event is None and _ALL_TYPES: return _ALL_TYPES types = OrderedDict() for recv, ret in register_notification_types.send(event): if isinstance(ret, (list, tuple)): for r in ret: types[r.action_type] = r else: types[ret.action_type] = ret if event is None: _ALL_TYPES = types return types
def get_all_notification_types(event=None): global _ALL_TYPES if event is None and _ALL_TYPES: return _ALL_TYPES types = OrderedDict() for recv, ret in register_notification_types.send(event): if isinstance(ret, (list, tuple)): for r in ret: types[r.action_type] = r else: types[ret.action_type] = ret if event is None: _ALL_TYPES = types return types