From 77e2d4c44a309accaa0a948a5af5073f0a2f517d Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 26 Aug 2017 18:07:11 +0300 Subject: [PATCH] Annotate context manager. --- aiogram/utils/context.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/aiogram/utils/context.py b/aiogram/utils/context.py index 7e38ec62..70c27b5b 100644 --- a/aiogram/utils/context.py +++ b/aiogram/utils/context.py @@ -1,3 +1,10 @@ +""" +Need setup task factory: + >>> from aiogram.utils import context + >>> loop = asyncio.get_event_loop() + >>> loop.set_task_factory(context.task_factory) +""" + import asyncio import typing @@ -101,5 +108,8 @@ def update_state(data=None, **kwargs): def check_configured(): - print('CONFIGURED', get_value(CONFIGURED)) + """ + Check loop is configured + :return: + """ return get_value(CONFIGURED)