- This case works fine:
on_process_result=go_to_main_state,
async def go_to_main_state(_, button: Button, manager: DialogManager):
await manager.switch_to(SettingsDialogSG.main)
- This case doesn't want to work:
on_process_result=SwitchTo(Const(""), id="_", state=SettingsDialogSG.main)
cause:
Expected type 'Optional[(Union[dict, list, int, str, None], Any, DialogManager) -> Awaitable]', got 'SwitchTo' instead
on_process_result=go_to_main_state,
async def go_to_main_state(_, button: Button, manager: DialogManager):
await manager.switch_to(SettingsDialogSG.main)
on_process_result=SwitchTo(Const(""), id="_", state=SettingsDialogSG.main)
cause:
Expected type 'Optional[(Union[dict, list, int, str, None], Any, DialogManager) -> Awaitable]', got 'SwitchTo' instead