From eea75b8e9a75b4e83adc6c8d5b15f85fb0492f53 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 22 Feb 2020 01:28:46 +0200 Subject: [PATCH] Fix typing --- aiogram/dispatcher/dispatcher.py | 2 +- tests/test_dispatcher/test_dispatcher.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index d45d623a..ef707a6a 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -192,7 +192,7 @@ class Dispatcher(Router): ) process_updates.add_done_callback(release_waiter, context=ctx) - def process_response(task: asyncio.Task): + def process_response(task: Future): warnings.warn( f"Detected slow response into webhook.\n" f"Telegram is waiting for response only first 60 seconds and then re-send update.\n" diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 3220f5c8..9d9f8f2f 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -4,6 +4,7 @@ import time import warnings import pytest + from aiogram import Bot from aiogram.api.methods import GetMe, GetUpdates, SendMessage from aiogram.api.types import Chat, Message, Update, User