From 4dbfb52a399b4f101a702f839580be6cdcf8dc31 Mon Sep 17 00:00:00 2001 From: andrew000 <11490628+andrew000@users.noreply.github.com> Date: Sat, 10 Sep 2022 01:19:52 +0300 Subject: [PATCH] Changed type annotation style to `typing.*` in dispatcher\handler.py --- aiogram/dispatcher/handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiogram/dispatcher/handler.py b/aiogram/dispatcher/handler.py index 10a94924..4efc2e07 100644 --- a/aiogram/dispatcher/handler.py +++ b/aiogram/dispatcher/handler.py @@ -1,7 +1,7 @@ import inspect +import typing from contextvars import ContextVar from dataclasses import dataclass -from typing import Optional, Iterable, List ctx_data = ContextVar('ctx_handler_data') current_handler = ContextVar('current_handler') @@ -40,7 +40,7 @@ class Handler: self.dispatcher = dispatcher self.once = once - self.handlers: List[Handler.HandlerObj] = [] + self.handlers: typing.List[Handler.HandlerObj] = [] self.middleware_key = middleware_key def register(self, handler, filters=None, index=None): @@ -135,4 +135,4 @@ class Handler: class HandlerObj: handler: callable spec: inspect.FullArgSpec - filters: Optional[Iterable[FilterObj]] = None + filters: typing.Optional[typing.Iterable[FilterObj]] = None