def reset_dialog_contexts(proxy: FSMContextProxy): proxy.pop(DIALOG_CONTEXT, None) proxy.pop(DIALOG_INTERNAL_CONTEXT, None)
def _extend_data(self, proxy: FSMContextProxy, no_error=True): for key, value in self.extend_data.items(): if no_error: proxy.setdefault(key, []) proxy[key].extend(to_list(value))
def _delete_keys(self, proxy: FSMContextProxy, no_error=True): for key in to_list(self.delete_keys): if no_error: proxy.pop(key) else: del proxy[key]
def compose_summary(data: FSMContextProxy): text = '#запрос\n' if good_man_name := data.get('good_man_name', ''): text += f'\nИмя заявителя: <b>{good_man_name}</b>'