From dd4cc7fbbb3aed10bdd94a6cd45c8768e9d4831c Mon Sep 17 00:00:00 2001 From: Max Smirnov Date: Wed, 26 Jan 2022 21:25:11 +0300 Subject: [PATCH] Remove unnecessary `Optional`s (#818) --- aiogram/dispatcher/dispatcher.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index e6160b3e..60aeed49 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -222,7 +222,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): """ await self.bot.get_updates(offset=-1, timeout=1) - async def process_updates(self, updates, fast: typing.Optional[bool] = True): + async def process_updates(self, updates, fast: bool = True): """ Process list of updates @@ -337,7 +337,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): relax=0.1, limit=None, reset_webhook=None, - fast: typing.Optional[bool] = True, + fast: bool = True, error_sleep: int = 5, allowed_updates: typing.Optional[typing.List[str]] = None): """ @@ -404,7 +404,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): self._close_waiter.set_result(None) log.warning('Polling is stopped.') - async def _process_polling_updates(self, updates, fast: typing.Optional[bool] = True): + async def _process_polling_updates(self, updates, fast: bool = True): """ Process updates received from long-polling. @@ -949,7 +949,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): def register_poll_handler(self, callback, *custom_filters, run_task=None, **kwargs): """ Register handler for poll - + Example: .. code-block:: python3 @@ -992,7 +992,7 @@ class Dispatcher(DataMixin, ContextInstanceMixin): def register_poll_answer_handler(self, callback, *custom_filters, run_task=None, **kwargs): """ Register handler for poll_answer - + Example: .. code-block:: python3