From 67e651e2394fb2a2c7b7cc3fbd55f16d4d0e4467 Mon Sep 17 00:00:00 2001 From: Forevka <32968153+Forevka@users.noreply.github.com> Date: Sat, 3 Jul 2021 12:07:02 +0000 Subject: [PATCH] format --- aiogram/utils/handlers_in_use.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aiogram/utils/handlers_in_use.py b/aiogram/utils/handlers_in_use.py index 925870f5..b50e89fa 100644 --- a/aiogram/utils/handlers_in_use.py +++ b/aiogram/utils/handlers_in_use.py @@ -3,7 +3,8 @@ from itertools import chain from typing import List from aiogram.dispatcher.dispatcher import Dispatcher -AIOGRAM_INTERNAL_HANDLERS = ['update', 'error',] +AIOGRAM_INTERNAL_HANDLERS = ['update', 'error', ] + def get_handlers_in_use(dispatcher: Dispatcher, handlers_to_skip: List[str] = AIOGRAM_INTERNAL_HANDLERS) -> List[str]: handlers_in_use = [] @@ -14,6 +15,7 @@ def get_handlers_in_use(dispatcher: Dispatcher, handlers_to_skip: List[str] = AI handlers_in_use.extend(chain(*list(map(get_handlers_in_use, router)))) else: for update_name, observer in router.observers.items(): - if (observer.handlers and update_name not in [*handlers_to_skip, *handlers_in_use]): handlers_in_use.append(update_name) + if (observer.handlers and update_name not in [*handlers_to_skip, *handlers_in_use]): + handlers_in_use.append(update_name) return handlers_in_use