diff --git a/aiogram/fsm/scene.py b/aiogram/fsm/scene.py index c5052008..32502296 100644 --- a/aiogram/fsm/scene.py +++ b/aiogram/fsm/scene.py @@ -120,7 +120,7 @@ class ObserverDecorator: handlers = getattr(target, "__aiogram_handler__", None) if not handlers: handlers = [] - target.__aiogram_handler__ = handlers + target.__aiogram_handler__ = handlers # type: ignore[union-attr] handlers.append( HandlerContainer( @@ -137,7 +137,7 @@ class ObserverDecorator: action = getattr(target, "__aiogram_action__", None) if action is None: action = defaultdict(dict) - target.__aiogram_action__ = action + target.__aiogram_action__ = action # type: ignore[attr-defined] action[self.action][self.name] = CallableObject(target) def __call__(self, target: CallbackType) -> CallbackType: diff --git a/aiogram/types/message.py b/aiogram/types/message.py index fe0476f6..91434ee7 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -4353,7 +4353,7 @@ class Message(MaybeInaccessibleMessage): :param include_thread_id: if set, adds chat thread id to URL and returns like https://t.me/username/thread_id/message_id :return: string with full message URL """ - if self.chat.type in ("private", "group"): + if self.chat.type in {"private", "group"}: return None chat_value = (