From bf919c8b80ad25986a2b9fdb40663907594328eb Mon Sep 17 00:00:00 2001 From: Forevka <32968153+Forevka@users.noreply.github.com> Date: Sat, 3 Jul 2021 13:03:51 +0000 Subject: [PATCH] codestyle --- aiogram/utils/handlers_in_use.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aiogram/utils/handlers_in_use.py b/aiogram/utils/handlers_in_use.py index d7b26217..0bf63000 100644 --- a/aiogram/utils/handlers_in_use.py +++ b/aiogram/utils/handlers_in_use.py @@ -5,8 +5,8 @@ from typing import List, cast from aiogram.dispatcher.dispatcher import Dispatcher AIOGRAM_INTERNAL_HANDLERS = [ - 'update', - 'error', + "update", + "error", ] @@ -16,13 +16,13 @@ def get_handlers_in_use( handlers_in_use: List[str] = [] for router in [dispatcher.sub_routers, dispatcher]: - if (isinstance(router, list)): - if (router): + if isinstance(router, list): + if router: handlers_in_use.extend(chain(*list(map(get_handlers_in_use, router)))) else: router = cast(Router, router) for update_name, observer in router.observers.items(): - if (observer.handlers and update_name not in [*handlers_to_skip, *handlers_in_use]): + if observer.handlers and update_name not in [*handlers_to_skip, *handlers_in_use]: handlers_in_use.append(update_name) return handlers_in_use