From c39baf1dbb6c2c0207cb628362e827b886fca475 Mon Sep 17 00:00:00 2001 From: mpa Date: Sun, 2 Aug 2020 15:16:26 +0400 Subject: [PATCH] docs: comments --- aiogram/dispatcher/dispatcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index ce4eef6b..e4f082af 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -110,9 +110,11 @@ class Dispatcher(DataMixin, ContextInstanceMixin): self._setup_filters() @property - def loop(self) -> asyncio.AbstractEventLoop: + def loop(self) -> typing.Optional[asyncio.AbstractEventLoop]: # for the sake of backward compatibility # lib internally must delegate tasks with respect to _main_loop attribute + # however should never be used by the library itself + # use more generic approaches from asyncio's namespace return self._main_loop @property