black formatting

This commit is contained in:
Forevka 2021-07-03 12:57:48 +00:00 committed by GitHub
parent 74574b4b5f
commit 259987a4aa
2 changed files with 11 additions and 3 deletions

View file

@ -309,7 +309,10 @@ class Dispatcher(Router):
:return:
"""
async for update in self._listen_updates(
bot, polling_timeout=polling_timeout, backoff_config=backoff_config, allowed_updates=allowed_updates,
bot,
polling_timeout=polling_timeout,
backoff_config=backoff_config,
allowed_updates=allowed_updates,
):
handle_update = self._process_update(bot=bot, update=update, **kwargs)
if handle_as_tasks:

View file

@ -4,10 +4,15 @@ from itertools import chain
from typing import List, cast
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]:
def get_handlers_in_use(
dispatcher: Dispatcher, handlers_to_skip: List[str] = AIOGRAM_INTERNAL_HANDLERS
) -> List[str]:
handlers_in_use: List[str] = []
for router in [dispatcher.sub_routers, dispatcher]: