From 4292b3934fd7ef8c3be4390fdefc33095230f4f6 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 24 Jan 2021 22:39:55 +0200 Subject: [PATCH] Removed temporary fix of CallableMixin.__post_init__ --- aiogram/dispatcher/event/handler.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/aiogram/dispatcher/event/handler.py b/aiogram/dispatcher/event/handler.py index 8314c52b..bc7ee10d 100644 --- a/aiogram/dispatcher/event/handler.py +++ b/aiogram/dispatcher/event/handler.py @@ -24,12 +24,6 @@ class CallableMixin: def __post_init__(self) -> None: callback = inspect.unwrap(self.callback) self.awaitable = inspect.isawaitable(callback) or inspect.iscoroutinefunction(callback) - if isinstance(callback, BaseFilter): - # Pydantic 1.5 has incorrect signature generator - # Issue: https://github.com/samuelcolvin/pydantic/issues/1419 - # Fixes: https://github.com/samuelcolvin/pydantic/pull/1427 - # TODO: Remove this temporary fix - callback = inspect.unwrap(callback.__call__) self.spec = inspect.getfullargspec(callback) def _prepare_kwargs(self, kwargs: Dict[str, Any]) -> Dict[str, Any]: