def _build_primary_matcher(cls, name, callback_id) -> ListenerMatcher: if name == "edit": return workflow_step_edit(callback_id) elif name == "save": return workflow_step_save(callback_id) elif name == "execute": return workflow_step_execute(callback_id) else: raise ValueError(f"Invalid name {name}")
def _build_matchers(cls, name: str, callback_id: str) -> Sequence[AsyncListenerMatcher]: if name == "edit": return [workflow_step_edit(callback_id, asyncio=True)] elif name == "save": return [workflow_step_save(callback_id, asyncio=True)] elif name == "execute": return [workflow_step_execute(callback_id, asyncio=True)] else: raise ValueError(f"Invalid name {name}")